diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 1997-04-08 00:29:19 +0000 |
---|---|---|
committer | <> | 2013-02-25 15:20:59 +0000 |
commit | f8d9d05cfb1ea783457a14d3cf7fdf4d8fa450f2 (patch) | |
tree | 058251f5aa8af2365812daa56d936e91720a6027 /refuse.c | |
download | tcp-wrappers-master.tar.gz |
Imported from /home/lorry/working-area/delta_tcp-wrappers/tcp_wrappers_7.6.tar.gz.HEADtcp_wrappers_7.6master
Diffstat (limited to 'refuse.c')
-rw-r--r-- | refuse.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/refuse.c b/refuse.c new file mode 100644 index 0000000..ccf8030 --- /dev/null +++ b/refuse.c @@ -0,0 +1,32 @@ + /* + * 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. + * + * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. + */ + +#ifndef lint +static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39"; +#endif + +/* System libraries. */ + +#include <stdio.h> +#include <syslog.h> + +/* Local stuff. */ + +#include "tcpd.h" + +/* refuse - refuse request */ + +void refuse(request) +struct request_info *request; +{ + syslog(deny_severity, "refused connect from %s", eval_client(request)); + clean_exit(request); + /* NOTREACHED */ +} + |