auth.h revision 81965
159138Smsmith/*- 259138Smsmith * Copyright (c) 1991, 1993 359138Smsmith * The Regents of the University of California. All rights reserved. 459138Smsmith * 559138Smsmith * Redistribution and use in source and binary forms, with or without 659138Smsmith * modification, are permitted provided that the following conditions 759138Smsmith * are met: 859138Smsmith * 1. Redistributions of source code must retain the above copyright 959138Smsmith * notice, this list of conditions and the following disclaimer. 1059138Smsmith * 2. Redistributions in binary form must reproduce the above copyright 1159138Smsmith * notice, this list of conditions and the following disclaimer in the 1259138Smsmith * documentation and/or other materials provided with the distribution. 1359138Smsmith * 3. All advertising materials mentioning features or use of this software 1459138Smsmith * must display the following acknowledgement: 1559138Smsmith * This product includes software developed by the University of 1659138Smsmith * California, Berkeley and its contributors. 1759138Smsmith * 4. Neither the name of the University nor the names of its contributors 1859138Smsmith * may be used to endorse or promote products derived from this software 1959138Smsmith * without specific prior written permission. 2059138Smsmith * 2159138Smsmith * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2259138Smsmith * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2359138Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2459138Smsmith * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2559138Smsmith * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2659138Smsmith * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2759138Smsmith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2859138Smsmith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2959138Smsmith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3059138Smsmith * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3159138Smsmith * SUCH DAMAGE. 3259138Smsmith * 3359138Smsmith * @(#)auth.h 8.1 (Berkeley) 6/4/93 3459138Smsmith * $FreeBSD: head/contrib/telnet/libtelnet/auth.h 81965 2001-08-20 12:28:40Z markm $ 3559138Smsmith */ 3659159Smsmith 3759159Smsmith/* 3859138Smsmith * Copyright (C) 1990 by the Massachusetts Institute of Technology 3959138Smsmith * 4059138Smsmith * Export of this software from the United States of America is assumed 4159138Smsmith * to require a specific license from the United States Government. 4259138Smsmith * It is the responsibility of any person or organization contemplating 4359138Smsmith * export to obtain such a license before exporting. 4459138Smsmith * 4559138Smsmith * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 4659138Smsmith * distribute this software and its documentation for any purpose and 4759138Smsmith * without fee is hereby granted, provided that the above copyright 4859138Smsmith * notice appear in all copies and that both that copyright notice and 4959138Smsmith * this permission notice appear in supporting documentation, and that 5059138Smsmith * the name of M.I.T. not be used in advertising or publicity pertaining 5159138Smsmith * to distribution of the software without specific, written prior 5259138Smsmith * permission. M.I.T. makes no representations about the suitability of 5359138Smsmith * this software for any purpose. It is provided "as is" without express 5459138Smsmith * or implied warranty. 5559138Smsmith */ 5659138Smsmith 5759138Smsmith#ifndef __AUTH__ 5859138Smsmith#define __AUTH__ 5959138Smsmith 6059138Smsmith#define AUTH_REJECT 0 /* Rejected */ 6159138Smsmith#define AUTH_UNKNOWN 1 /* We don't know who he is, but he's okay */ 6259138Smsmith#define AUTH_OTHER 2 /* We know him, but not his name */ 6359138Smsmith#define AUTH_USER 3 /* We know he name */ 6459138Smsmith#define AUTH_VALID 4 /* We know him, and he needs no password */ 6559138Smsmith 6659138Smsmith#if !defined(P) 6759138Smsmith#ifdef __STDC__ 6859138Smsmith#define P(x) x 6959138Smsmith#else 7059138Smsmith#define P(x) () 7159138Smsmith#endif 7259138Smsmith#endif 7359138Smsmith 7459138Smsmithtypedef struct XauthP { 7559138Smsmith int type; 7659138Smsmith int way; 7759138Smsmith int (*init) P((struct XauthP *, int)); 7859138Smsmith int (*send) P((struct XauthP *)); 7959138Smsmith void (*is) P((struct XauthP *, unsigned char *, int)); 8059138Smsmith void (*reply) P((struct XauthP *, unsigned char *, int)); 8159138Smsmith int (*status) P((struct XauthP *, char *, int)); 8259138Smsmith void (*printsub) P((unsigned char *, int, unsigned char *, int)); 8359138Smsmith} Authenticator; 8459138Smsmith 8559138Smsmith#include "auth-proto.h" 8659138Smsmith 8759138Smsmithextern int auth_debug_mode; 8859138Smsmith#endif 8959138Smsmith