1 /* 2 * hosts_ctl() combines common applications of the host access control 3 * library routines. It bundles its arguments then calls the hosts_access() 4 * access control checker. The host name and user name arguments should be 5 * empty strings, STRING_UNKNOWN or real data. If a match is found, the 6 * optional shell command is executed. 7 * 8 * Restriction: this interface does not pass enough information to support 9 * selective remote username lookups or selective hostname double checks. 10 * 11 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. 12 */ 13 14 #include <stdio.h> 15 16 #include "tcpd.h" 17 18 /* hosts_ctl - limited interface to the hosts_access() routine */ 19 20 int hosts_ctl(daemon, name, addr, user) 21 char *daemon; 22 char *name; 23 char *addr; 24 char *user; 25 { 26 struct request_info request; 27 28 return (hosts_access(request_init(&request, 29 RQ_DAEMON, daemon, 30 RQ_CLIENT_NAME, name, 31 RQ_CLIENT_ADDR, addr, 32 RQ_USER, user, 33 0))); 34 } 35