194576Sdes/*- 294576Sdes * Copyright (c) 2002 Networks Associates Technology, Inc. 394576Sdes * All rights reserved. 494576Sdes * 594576Sdes * This software was developed for the FreeBSD Project by ThinkSec AS and 694576Sdes * NAI Labs, the Security Research Division of Network Associates, Inc. 794576Sdes * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the 894576Sdes * DARPA CHATS research program. 994576Sdes * 1094576Sdes * Redistribution and use in source and binary forms, with or without 1194576Sdes * modification, are permitted provided that the following conditions 1294576Sdes * are met: 1394576Sdes * 1. Redistributions of source code must retain the above copyright 1494576Sdes * notice, this list of conditions and the following disclaimer. 1594576Sdes * 2. Redistributions in binary form must reproduce the above copyright 1694576Sdes * notice, this list of conditions and the following disclaimer in the 1794576Sdes * documentation and/or other materials provided with the distribution. 1894576Sdes * 3. The name of the author may not be used to endorse or promote 1994576Sdes * products derived from this software without specific prior written 2094576Sdes * permission. 2194576Sdes * 2294576Sdes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 2394576Sdes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2494576Sdes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2594576Sdes * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2694576Sdes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2794576Sdes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2894576Sdes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2994576Sdes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3094576Sdes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3194576Sdes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3294576Sdes * SUCH DAMAGE. 3394576Sdes * 3494576Sdes * $FreeBSD$ 3594576Sdes */ 3694576Sdes 3794576Sdes#ifndef _YPCLNT_H_INCLUDED 3894576Sdes 3994576Sdestypedef struct ypclnt ypclnt_t; 4094576Sdesstruct ypclnt { 4194576Sdes char *domain; /* Domain name */ 4294576Sdes char *map; /* Map name */ 4394576Sdes char *server; /* Server name */ 4494576Sdes char *error; /* Error message */ 4594576Sdes}; 4694576Sdes 4794576Sdesstruct passwd; 4894576Sdes 4994576Sdesypclnt_t *ypclnt_new(const char *, const char *, const char *); 5094576Sdesvoid ypclnt_free(ypclnt_t *); 5194576Sdesvoid ypclnt_error(ypclnt_t *, const char *, const char *, ...); 5294576Sdesint ypclnt_connect(ypclnt_t *); 5396198Sdesint ypclnt_havepasswdd(ypclnt_t *); 5494576Sdesint ypclnt_passwd(ypclnt_t *, const struct passwd *, const char *); 5594576Sdes 5694576Sdes#endif 57