8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libwrap / hosts_ctl.c
blobb93bcb690d991e525275b17140ece3ae8edb6485
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"
7 /*
8 * hosts_ctl() combines common applications of the host access control
9 * library routines. It bundles its arguments then calls the hosts_access()
10 * access control checker. The host name and user name arguments should be
11 * empty strings, STRING_UNKNOWN or real data. If a match is found, the
12 * optional shell command is executed.
14 * Restriction: this interface does not pass enough information to support
15 * selective remote username lookups or selective hostname double checks.
17 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
20 #ifndef lint
21 static char sccsid[] = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27";
22 #endif
24 #include <stdio.h>
26 #include "tcpd.h"
28 /* hosts_ctl - limited interface to the hosts_access() routine */
30 int hosts_ctl(daemon, name, addr, user)
31 char *daemon;
32 char *name;
33 char *addr;
34 char *user;
36 struct request_info request;
38 return (hosts_access(request_init(&request,
39 RQ_DAEMON, daemon,
40 RQ_CLIENT_NAME, name,
41 RQ_CLIENT_ADDR, addr,
42 RQ_USER, user,
43 0)));