From f8d9d05cfb1ea783457a14d3cf7fdf4d8fa450f2 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 8 Apr 1997 00:29:19 +0000 Subject: Imported from /home/lorry/working-area/delta_tcp-wrappers/tcp_wrappers_7.6.tar.gz. --- hosts_ctl.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 hosts_ctl.c (limited to 'hosts_ctl.c') diff --git a/hosts_ctl.c b/hosts_ctl.c new file mode 100644 index 0000000..e57f30a --- /dev/null +++ b/hosts_ctl.c @@ -0,0 +1,38 @@ + /* + * hosts_ctl() combines common applications of the host access control + * library routines. It bundles its arguments then calls the hosts_access() + * access control checker. The host name and user name arguments should be + * empty strings, STRING_UNKNOWN or real data. If a match is found, the + * optional shell command is executed. + * + * Restriction: this interface does not pass enough information to support + * selective remote username lookups or selective hostname double checks. + * + * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. + */ + +#ifndef lint +static char sccsid[] = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27"; +#endif + +#include + +#include "tcpd.h" + +/* hosts_ctl - limited interface to the hosts_access() routine */ + +int hosts_ctl(daemon, name, addr, user) +char *daemon; +char *name; +char *addr; +char *user; +{ + struct request_info request; + + return (hosts_access(request_init(&request, + RQ_DAEMON, daemon, + RQ_CLIENT_NAME, name, + RQ_CLIENT_ADDR, addr, + RQ_USER, user, + 0))); +} -- cgit v1.2.1