2 * Copyright (c) 1995-2000 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of the Institute nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 /* General definitions */
43 /* The maximum sizes for aname, realm, sname, and instance +1 */
48 /* Leave space for quoting */
49 #define MAX_K_NAME_SZ (2*ANAME_SZ + 2*INST_SZ + 2*REALM_SZ - 3)
53 #define DATE_SZ 26 /* RTI date output */
55 #define MAX_HSTNM 100 /* for compatibility */
57 typedef struct krb_principal
{
59 char instance
[INST_SZ
];
63 #ifndef DEFAULT_TKT_LIFE /* allow compile-time override */
64 /* default lifetime for krb_mk_req & co., 10 hrs */
65 #define DEFAULT_TKT_LIFE 120
68 #define KRB_TICKET_GRANTING_TICKET "krbtgt"
70 /* Definition of text structure used to pass text around */
71 #define MAX_KTXT_LEN 1250
74 unsigned int length
; /* Length of the text */
75 unsigned char dat
[MAX_KTXT_LEN
]; /* The data itself */
76 u_int32_t mbz
; /* zero to catch runaway strings */
79 typedef struct ktext
*KTEXT
;
80 typedef struct ktext KTEXT_ST
;
82 #include "krb4-protos.h"