| 1 |
/* |
| 2 |
Copyright (C) 1996-2026 Free Software Foundation, Inc. |
| 3 |
|
| 4 |
This file is part of GNU Inetutils. |
| 5 |
|
| 6 |
GNU Inetutils is free software: you can redistribute it and/or modify |
| 7 |
it under the terms of the GNU General Public License as published by |
| 8 |
the Free Software Foundation, either version 3 of the License, or (at |
| 9 |
your option) any later version. |
| 10 |
|
| 11 |
GNU Inetutils is distributed in the hope that it will be useful, but |
| 12 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
General Public License for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License |
| 17 |
along with this program. If not, see `http://www.gnu.org/licenses/'. */ |
| 18 |
|
| 19 |
/* |
| 20 |
* Copyright (c) 1991, 1993 |
| 21 |
* The Regents of the University of California. All rights reserved. |
| 22 |
* |
| 23 |
* Redistribution and use in source and binary forms, with or without |
| 24 |
* modification, are permitted provided that the following conditions |
| 25 |
* are met: |
| 26 |
* 1. Redistributions of source code must retain the above copyright |
| 27 |
* notice, this list of conditions and the following disclaimer. |
| 28 |
* 2. Redistributions in binary form must reproduce the above copyright |
| 29 |
* notice, this list of conditions and the following disclaimer in the |
| 30 |
* documentation and/or other materials provided with the distribution. |
| 31 |
* 3. Neither the name of the University nor the names of its contributors |
| 32 |
* may be used to endorse or promote products derived from this software |
| 33 |
* without specific prior written permission. |
| 34 |
* |
| 35 |
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 36 |
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 37 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 38 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 39 |
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 40 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 41 |
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 42 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 43 |
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 44 |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 45 |
* SUCH DAMAGE. |
| 46 |
*/ |
| 47 |
|
| 48 |
/* |
| 49 |
* Copyright (C) 1990, 2000 by the Massachusetts Institute of Technology |
| 50 |
* |
| 51 |
* Export of this software from the United States of America is assumed |
| 52 |
* to require a specific license from the United States Government. |
| 53 |
* It is the responsibility of any person or organization contemplating |
| 54 |
* export to obtain such a license before exporting. |
| 55 |
* |
| 56 |
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and |
| 57 |
* distribute this software and its documentation for any purpose and |
| 58 |
* without fee is hereby granted, provided that the above copyright |
| 59 |
* notice appear in all copies and that both that copyright notice and |
| 60 |
* this permission notice appear in supporting documentation, and that |
| 61 |
* the name of M.I.T. not be used in advertising or publicity pertaining |
| 62 |
* to distribution of the software without specific, written prior |
| 63 |
* permission. M.I.T. makes no representations about the suitability of |
| 64 |
* this software for any purpose. It is provided "as is" without express |
| 65 |
* or implied warranty. |
| 66 |
*/ |
| 67 |
|
| 68 |
#ifndef __AUTH__ |
| 69 |
# define __AUTH__ |
| 70 |
|
| 71 |
/* These might be defined in <arpa/telnet.h>. */ |
| 72 |
# ifndef AUTH_REJECT |
| 73 |
# define AUTH_REJECT 0 /* Rejected */ |
| 74 |
# endif |
| 75 |
# ifndef AUTH_UNKNOWN |
| 76 |
# define AUTH_UNKNOWN 1 /* We don't know who he is, but he's okay */ |
| 77 |
# endif |
| 78 |
# ifndef AUTH_OTHER |
| 79 |
# define AUTH_OTHER 2 /* We know him, but not his name */ |
| 80 |
# endif |
| 81 |
# ifndef AUTH_USER |
| 82 |
# define AUTH_USER 3 /* We know the name */ |
| 83 |
# endif |
| 84 |
# ifndef AUTH_VALID |
| 85 |
# define AUTH_VALID 4 /* We know him, and he needs no password */ |
| 86 |
# endif |
| 87 |
|
| 88 |
typedef struct XauthP |
| 89 |
{ |
| 90 |
int type; |
| 91 |
int way; |
| 92 |
int (*init) (struct XauthP *, int); |
| 93 |
int (*send) (struct XauthP *); |
| 94 |
void (*is) (struct XauthP *, unsigned char *, int); |
| 95 |
void (*reply) (struct XauthP *, unsigned char *, int); |
| 96 |
int (*status) (struct XauthP *, char *, size_t, int); |
| 97 |
void (*printsub) (unsigned char *, int, char *, int); |
| 98 |
void (*cleanup) (struct XauthP *); |
| 99 |
} TN_Authenticator; |
| 100 |
|
| 101 |
# include "auth-proto.h" |
| 102 |
|
| 103 |
# define OPTS_FORWARD_CREDS 0x00000002 |
| 104 |
# define OPTS_FORWARDABLE_CREDS 0x00000001 |
| 105 |
|
| 106 |
extern int auth_debug_mode; |
| 107 |
#endif |