157416Smarkm/*-
257416Smarkm * Copyright (c) 1991, 1993
357416Smarkm *	The Regents of the University of California.  All rights reserved.
457416Smarkm *
557416Smarkm * Redistribution and use in source and binary forms, with or without
657416Smarkm * modification, are permitted provided that the following conditions
757416Smarkm * are met:
857416Smarkm * 1. Redistributions of source code must retain the above copyright
957416Smarkm *    notice, this list of conditions and the following disclaimer.
1057416Smarkm * 2. Redistributions in binary form must reproduce the above copyright
1157416Smarkm *    notice, this list of conditions and the following disclaimer in the
1257416Smarkm *    documentation and/or other materials provided with the distribution.
1357416Smarkm * 3. All advertising materials mentioning features or use of this software
1457416Smarkm *    must display the following acknowledgement:
1557416Smarkm *	This product includes software developed by the University of
1657416Smarkm *	California, Berkeley and its contributors.
1757416Smarkm * 4. Neither the name of the University nor the names of its contributors
1857416Smarkm *    may be used to endorse or promote products derived from this software
1957416Smarkm *    without specific prior written permission.
2057416Smarkm *
2157416Smarkm * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2257416Smarkm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2357416Smarkm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2457416Smarkm * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2557416Smarkm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2657416Smarkm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2757416Smarkm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2857416Smarkm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2957416Smarkm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3057416Smarkm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3157416Smarkm * SUCH DAMAGE.
3257416Smarkm *
3357416Smarkm *	@(#)auth.h	8.1 (Berkeley) 6/4/93
3457416Smarkm */
3557416Smarkm
3657416Smarkm/*
3757416Smarkm * Copyright (C) 1990 by the Massachusetts Institute of Technology
3857416Smarkm *
3957416Smarkm * Export of this software from the United States of America is assumed
4057416Smarkm * to require a specific license from the United States Government.
4157416Smarkm * It is the responsibility of any person or organization contemplating
4257416Smarkm * export to obtain such a license before exporting.
4357416Smarkm *
4457416Smarkm * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
4557416Smarkm * distribute this software and its documentation for any purpose and
4657416Smarkm * without fee is hereby granted, provided that the above copyright
4757416Smarkm * notice appear in all copies and that both that copyright notice and
4857416Smarkm * this permission notice appear in supporting documentation, and that
4957416Smarkm * the name of M.I.T. not be used in advertising or publicity pertaining
5057416Smarkm * to distribution of the software without specific, written prior
5157416Smarkm * permission.  M.I.T. makes no representations about the suitability of
5257416Smarkm * this software for any purpose.  It is provided "as is" without express
5357416Smarkm * or implied warranty.
5457416Smarkm */
5557416Smarkm
56233294Sstas/* $Id$ */
5757416Smarkm
5857416Smarkm#ifndef	__AUTH__
5957416Smarkm#define	__AUTH__
6057416Smarkm
6157416Smarkm#define	AUTH_REJECT	0	/* Rejected */
6257416Smarkm#define	AUTH_UNKNOWN	1	/* We don't know who he is, but he's okay */
6357416Smarkm#define	AUTH_OTHER	2	/* We know him, but not his name */
6457416Smarkm#define	AUTH_USER	3	/* We know he name */
6557416Smarkm#define	AUTH_VALID	4	/* We know him, and he needs no password */
6657416Smarkm
6757416Smarkmtypedef struct XauthP {
6857416Smarkm	int	type;
6957416Smarkm	int	way;
7057416Smarkm	int	(*init) (struct XauthP *, int);
7157416Smarkm	int	(*send) (struct XauthP *);
7257416Smarkm	void	(*is) (struct XauthP *, unsigned char *, int);
7357416Smarkm	void	(*reply) (struct XauthP *, unsigned char *, int);
7457416Smarkm	int	(*status) (struct XauthP *, char *, size_t, int);
75233294Sstas	void	(*printsub) (unsigned char *, size_t, unsigned char *, size_t);
7657416Smarkm} Authenticator;
7757416Smarkm
7857416Smarkm#include "auth-proto.h"
7957416Smarkm
8057416Smarkmextern int auth_debug_mode;
8157416Smarkm#endif
82