1 /* $NetBSD: refuse.c,v 1.5 2012/03/21 10:10:37 matt Exp $ */ 2 3 /* 4 * refuse() reports a refused connection, and takes the consequences: in 5 * case of a datagram-oriented service, the unread datagram is taken from 6 * the input queue (or inetd would see the same datagram again and again); 7 * the program is terminated. 8 * 9 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. 10 */ 11 12 #include <sys/cdefs.h> 13 #ifndef lint 14 #if 0 15 static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39"; 16 #else 17 __RCSID("$NetBSD: refuse.c,v 1.5 2012/03/21 10:10:37 matt Exp $"); 18 #endif 19 #endif 20 21 /* System libraries. */ 22 23 #include <stdio.h> 24 #include <syslog.h> 25 26 /* Local stuff. */ 27 28 #include "tcpd.h" 29 30 /* refuse - refuse request */ 31 32 void refuse(struct request_info * request)33refuse(struct request_info *request) 34 { 35 syslog(deny_severity, "refused connect from %s", eval_client(request)); 36 clean_exit(request); 37 /* NOTREACHED */ 38 } 39 40