refuse.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
2N/A/*
2N/A * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A /*
2N/A * refuse() reports a refused connection, and takes the consequences: in
2N/A * case of a datagram-oriented service, the unread datagram is taken from
2N/A * the input queue (or inetd would see the same datagram again and again);
2N/A * the program is terminated.
2N/A *
2N/A * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
2N/A */
2N/A
2N/A#ifndef lint
2N/Astatic char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39";
2N/A#endif
2N/A
2N/A/* System libraries. */
2N/A
2N/A#include <stdio.h>
2N/A#include <syslog.h>
2N/A
2N/A/* Local stuff. */
2N/A
2N/A#include "tcpd.h"
2N/A
2N/A/* refuse - refuse request */
2N/A
2N/Avoid refuse(request)
2N/Astruct request_info *request;
2N/A{
2N/A syslog(deny_severity, "refused connect from %s", eval_client(request));
2N/A clean_exit(request);
2N/A /* NOTREACHED */
2N/A}
2N/A
2N/A