1*4fcf8685Sperry /* $NetBSD: auth.h,v 1.11 2005/02/06 05:53:07 perry Exp $ */ 20667d122Schristos 361f28255Scgd /*- 450c0885eScgd * Copyright (c) 1991, 1993 550c0885eScgd * The Regents of the University of California. All rights reserved. 661f28255Scgd * 761f28255Scgd * Redistribution and use in source and binary forms, with or without 861f28255Scgd * modification, are permitted provided that the following conditions 961f28255Scgd * are met: 1061f28255Scgd * 1. Redistributions of source code must retain the above copyright 1161f28255Scgd * notice, this list of conditions and the following disclaimer. 1261f28255Scgd * 2. Redistributions in binary form must reproduce the above copyright 1361f28255Scgd * notice, this list of conditions and the following disclaimer in the 1461f28255Scgd * documentation and/or other materials provided with the distribution. 15eb7c1594Sagc * 3. Neither the name of the University nor the names of its contributors 1661f28255Scgd * may be used to endorse or promote products derived from this software 1761f28255Scgd * without specific prior written permission. 1861f28255Scgd * 1961f28255Scgd * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2061f28255Scgd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2161f28255Scgd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2261f28255Scgd * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2361f28255Scgd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2461f28255Scgd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2561f28255Scgd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2661f28255Scgd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2761f28255Scgd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2861f28255Scgd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2961f28255Scgd * SUCH DAMAGE. 3061f28255Scgd * 3150c0885eScgd * from: @(#)auth.h 8.1 (Berkeley) 6/4/93 3261f28255Scgd */ 3361f28255Scgd 3461f28255Scgd /* 3561f28255Scgd * Copyright (C) 1990 by the Massachusetts Institute of Technology 3661f28255Scgd * 3761f28255Scgd * Export of this software from the United States of America is assumed 3861f28255Scgd * to require a specific license from the United States Government. 3961f28255Scgd * It is the responsibility of any person or organization contemplating 4061f28255Scgd * export to obtain such a license before exporting. 4161f28255Scgd * 4261f28255Scgd * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 4361f28255Scgd * distribute this software and its documentation for any purpose and 4461f28255Scgd * without fee is hereby granted, provided that the above copyright 4561f28255Scgd * notice appear in all copies and that both that copyright notice and 4661f28255Scgd * this permission notice appear in supporting documentation, and that 4761f28255Scgd * the name of M.I.T. not be used in advertising or publicity pertaining 4861f28255Scgd * to distribution of the software without specific, written prior 4961f28255Scgd * permission. M.I.T. makes no representations about the suitability of 5061f28255Scgd * this software for any purpose. It is provided "as is" without express 5161f28255Scgd * or implied warranty. 5261f28255Scgd */ 5361f28255Scgd 5461f28255Scgd #ifndef __AUTH__ 5561f28255Scgd #define __AUTH__ 5661f28255Scgd 5761f28255Scgd #define AUTH_REJECT 0 /* Rejected */ 5861f28255Scgd #define AUTH_UNKNOWN 1 /* We don't know who he is, but he's okay */ 5961f28255Scgd #define AUTH_OTHER 2 /* We know him, but not his name */ 6061f28255Scgd #define AUTH_USER 3 /* We know he name */ 6161f28255Scgd #define AUTH_VALID 4 /* We know him, and he needs no password */ 6261f28255Scgd 6361f28255Scgd typedef struct XauthP { 6461f28255Scgd int type; 6561f28255Scgd int way; 66*4fcf8685Sperry int (*init)(struct XauthP *, int); 67*4fcf8685Sperry int (*send)(struct XauthP *); 68*4fcf8685Sperry void (*is)(struct XauthP *, unsigned char *, int); 69*4fcf8685Sperry void (*reply)(struct XauthP *, unsigned char *, int); 70*4fcf8685Sperry int (*status)(struct XauthP *, char *, size_t, int); 71*4fcf8685Sperry void (*printsub)(unsigned char *, int, unsigned char *, int); 7261f28255Scgd } Authenticator; 7361f28255Scgd 7461f28255Scgd #include "auth-proto.h" 7561f28255Scgd 76b911aa52Saidan #define OPTS_FORWARD_CREDS 0x00000002 77b911aa52Saidan #define OPTS_FORWARDABLE_CREDS 0x00000001 78b911aa52Saidan 7935a77f5bSmycroft extern int auth_debug_mode; 8061f28255Scgd #endif 81