diff options
author | Mark Murray <markm@FreeBSD.org> | 1999-03-14 17:13:19 +0000 |
---|---|---|
committer | Mark Murray <markm@FreeBSD.org> | 1999-03-14 17:13:19 +0000 |
commit | 2aef693010b252e8cff0ce46a6ebf15b74c82219 (patch) | |
tree | 5c4b2dfe1ca36eeb731956db3380eef1053a2d03 /contrib/tcp_wrappers/hosts_ctl.c |
Clean import of TCP-wrappers by Wietse Venema.vendor/tcp_wrappers/7.6
Rest of build to follow.
Notes
Notes:
svn path=/vendor/tcp_wrappers/dist/; revision=44743
svn path=/vendor/tcp_wrappers/7.6/; revision=44745; tag=vendor/tcp_wrappers/7.6
Diffstat (limited to 'contrib/tcp_wrappers/hosts_ctl.c')
-rw-r--r-- | contrib/tcp_wrappers/hosts_ctl.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/contrib/tcp_wrappers/hosts_ctl.c b/contrib/tcp_wrappers/hosts_ctl.c new file mode 100644 index 000000000000..e57f30aaa4a4 --- /dev/null +++ b/contrib/tcp_wrappers/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 <stdio.h> + +#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))); +} |