1 /* 2 * Copyright 2001 Sun Microsystems, Inc. All rights reserved. 3 * Use is subject to license terms. 4 */ 5 #pragma ident "%Z%%M% %I% %E% SMI" 6 7 /* 8 * refuse() reports a refused connection, and takes the consequences: in 9 * case of a datagram-oriented service, the unread datagram is taken from 10 * the input queue (or inetd would see the same datagram again and again); 11 * the program is terminated. 12 * 13 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. 14 */ 15 16 #ifndef lint 17 static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39"; 18 #endif 19 20 /* System libraries. */ 21 22 #include <stdio.h> 23 #include <syslog.h> 24 25 /* Local stuff. */ 26 27 #include "tcpd.h" 28 29 /* refuse - refuse request */ 30 31 void refuse(request) 32 struct request_info *request; 33 { 34 syslog(deny_severity, "refused connect from %s", eval_client(request)); 35 clean_exit(request); 36 /* NOTREACHED */ 37 } 38 39