[BACK]Return to hosts_ctl.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libwrap

Annotation of src/lib/libwrap/hosts_ctl.c, Revision 1.4.66.2

1.4.66.2! riz         1: /*     $NetBSD: hosts_ctl.c,v 1.4.66.1 2012/04/23 16:48:54 riz Exp $   */
1.2       christos    2:
1.1       mrg         3:  /*
                      4:   * hosts_ctl() combines common applications of the host access control
                      5:   * library routines. It bundles its arguments then calls the hosts_access()
                      6:   * access control checker. The host name and user name arguments should be
                      7:   * empty strings, STRING_UNKNOWN or real data. If a match is found, the
                      8:   * optional shell command is executed.
1.4       simonb      9:   *
1.1       mrg        10:   * Restriction: this interface does not pass enough information to support
                     11:   * selective remote username lookups or selective hostname double checks.
1.4       simonb     12:   *
1.1       mrg        13:   * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
                     14:   */
                     15:
1.2       christos   16: #include <sys/cdefs.h>
1.1       mrg        17: #ifndef lint
1.2       christos   18: #if 0
1.1       mrg        19: static char sccsid[] = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27";
1.2       christos   20: #else
1.4.66.2! riz        21: __RCSID("$NetBSD: hosts_ctl.c,v 1.4.66.1 2012/04/23 16:48:54 riz Exp $");
1.2       christos   22: #endif
1.1       mrg        23: #endif
                     24:
                     25: #include <stdio.h>
                     26:
                     27: #include "tcpd.h"
                     28:
                     29: /* hosts_ctl - limited interface to the hosts_access() routine */
                     30:
1.4.66.2! riz        31: int     hosts_ctl(daemon, name, addr, user)
        !            32: char   *daemon;
        !            33: char   *name;
        !            34: char   *addr;
        !            35: char   *user;
1.1       mrg        36: {
                     37:     struct request_info request;
                     38:
                     39:     return (hosts_access(request_init(&request,
                     40:                                      RQ_DAEMON, daemon,
                     41:                                      RQ_CLIENT_NAME, name,
                     42:                                      RQ_CLIENT_ADDR, addr,
                     43:                                      RQ_USER, user,
                     44:                                      0)));
                     45: }

CVSweb <webmaster@jp.NetBSD.org>