auth.h revision 57416
1234353Sdim/*-
2193323Sed * Copyright (c) 1991, 1993
3193323Sed *	The Regents of the University of California.  All rights reserved.
4193323Sed *
5193323Sed * Redistribution and use in source and binary forms, with or without
6193323Sed * modification, are permitted provided that the following conditions
7193323Sed * are met:
8193323Sed * 1. Redistributions of source code must retain the above copyright
9193323Sed *    notice, this list of conditions and the following disclaimer.
10224145Sdim * 2. Redistributions in binary form must reproduce the above copyright
11193323Sed *    notice, this list of conditions and the following disclaimer in the
12193323Sed *    documentation and/or other materials provided with the distribution.
13193323Sed * 3. All advertising materials mentioning features or use of this software
14193323Sed *    must display the following acknowledgement:
15249423Sdim *	This product includes software developed by the University of
16218893Sdim *	California, Berkeley and its contributors.
17249423Sdim * 4. Neither the name of the University nor the names of its contributors
18249423Sdim *    may be used to endorse or promote products derived from this software
19249423Sdim *    without specific prior written permission.
20249423Sdim *
21243830Sdim * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22249423Sdim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23224145Sdim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24224145Sdim * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25224145Sdim * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26224145Sdim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27224145Sdim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28193323Sed * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29193323Sed * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30194710Sed * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31194710Sed * SUCH DAMAGE.
32194710Sed *
33194710Sed *	@(#)auth.h	8.1 (Berkeley) 6/4/93
34199989Srdivacky */
35263508Sdim
36199989Srdivacky/*
37218893Sdim * Copyright (C) 1990 by the Massachusetts Institute of Technology
38243830Sdim *
39243830Sdim * Export of this software from the United States of America is assumed
40243830Sdim * to require a specific license from the United States Government.
41263508Sdim * It is the responsibility of any person or organization contemplating
42263508Sdim * export to obtain such a license before exporting.
43263508Sdim *
44263508Sdim * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
45263508Sdim * distribute this software and its documentation for any purpose and
46218893Sdim * without fee is hereby granted, provided that the above copyright
47263508Sdim * notice appear in all copies and that both that copyright notice and
48263508Sdim * this permission notice appear in supporting documentation, and that
49263508Sdim * the name of M.I.T. not be used in advertising or publicity pertaining
50263508Sdim * to distribution of the software without specific, written prior
51263508Sdim * permission.  M.I.T. makes no representations about the suitability of
52263508Sdim * this software for any purpose.  It is provided "as is" without express
53263508Sdim * or implied warranty.
54263508Sdim */
55263508Sdim
56263508Sdim/* $Id: auth.h,v 1.4 1998/06/09 19:24:41 joda Exp $ */
57263508Sdim
58263508Sdim#ifndef	__AUTH__
59263508Sdim#define	__AUTH__
60263508Sdim
61263508Sdim#define	AUTH_REJECT	0	/* Rejected */
62263508Sdim#define	AUTH_UNKNOWN	1	/* We don't know who he is, but he's okay */
63263508Sdim#define	AUTH_OTHER	2	/* We know him, but not his name */
64263508Sdim#define	AUTH_USER	3	/* We know he name */
65263508Sdim#define	AUTH_VALID	4	/* We know him, and he needs no password */
66263508Sdim
67263508Sdimtypedef struct XauthP {
68263508Sdim	int	type;
69263508Sdim	int	way;
70263508Sdim	int	(*init) (struct XauthP *, int);
71263508Sdim	int	(*send) (struct XauthP *);
72263508Sdim	void	(*is) (struct XauthP *, unsigned char *, int);
73263508Sdim	void	(*reply) (struct XauthP *, unsigned char *, int);
74263508Sdim	int	(*status) (struct XauthP *, char *, size_t, int);
75263508Sdim	void	(*printsub) (unsigned char *, int, unsigned char *, int);
76263508Sdim} Authenticator;
77224145Sdim
78249423Sdim#include "auth-proto.h"
79224145Sdim
80218893Sdimextern int auth_debug_mode;
81263508Sdim#endif
82193323Sed