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

File: [cvs.NetBSD.org] / src / lib / libwrap / hosts_ctl.c (download)

Revision, Mon Apr 23 23:40:41 2012 UTC (9 years, 6 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since +7 -4 lines

Back out changes committed as part of ticket #195 which were apparently
not intended as part of the pullup request.  Should fix netbsd-6 build.

/*	$NetBSD: hosts_ctl.c,v 2012/04/23 23:40:41 riz Exp $	*/

  * 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.

#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27";
__RCSID("$NetBSD: hosts_ctl.c,v 2012/04/23 23:40:41 riz Exp $");

#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,