1/*
2 * Copyright (c) 2006, 2008, 2010 Apple Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28
29#ifndef _GSSD_MACH_TYPES_H_
30#define _GSSD_MACH_TYPES_H_
31
32#define MAX_DISPLAY_STR 128
33#define MAX_PRINC_STR 1024
34
35typedef enum gssd_mechtype {
36 GSSD_NO_MECH = -1,
37 GSSD_KRB5_MECH = 0,
38 GSSD_SPNEGO_MECH,
39 GSSD_NTLM_MECH,
40 GSSD_IAKERB_MECH
41} gssd_mechtype;
42
43typedef enum gssd_nametype {
44 GSSD_STRING_NAME = 0,
45 GSSD_EXPORT,
46 GSSD_ANONYMOUS,
47 GSSD_HOSTBASED,
48 GSSD_USER,
49 GSSD_MACHINE_UID,
50 GSSD_STRING_UID,
51 GSSD_KRB5_PRINCIPAL,
52 GSSD_KRB5_REFERRAL,
53 GSSD_NTLM_PRINCIPAL,
54 GSSD_NTLM_BLOB,
55 GSSD_UUID
56} gssd_nametype;
57
58typedef char *gssd_string;
59typedef char *gssd_dstring;
60typedef uint8_t *gssd_byte_buffer;
61typedef uint32_t *gssd_gid_list;
62typedef uint64_t gssd_ctx;
63typedef uint64_t gssd_cred;
64typedef int32_t *gssd_etype_list;
65
66/* The following need to correspond to GSS_C_*_FLAG in gssapi.h */
67#define GSSD_DELEG_FLAG 1
68#define GSSD_MUTUAL_FLAG 2
69#define GSSD_REPLAY_FLAG 4
70#define GSSD_SEQUENCE_FLAG 8
71#define GSSD_CONF_FLAG 16
72#define GSSD_INTEG_FLAG 32
73#define GSSD_ANON_FLAG 64
74#define GSSD_PROT_FLAG 128
75#define GSSD_TRANS_FLAG 256
76#define GSSD_DELEG_POLICY_FLAG 32768
77
78#define GSSD_NO_DEFAULT 1 // Only use the supplied principal, do not fallback to the default.
79#define GSSD_NO_CANON 2 // Don't canononicalize host names
80#define GSSD_HOME_ACCESS_OK 4 // OK to access home directory
81#define GSSD_GUEST_ONLY 8 // NTLM Server is forcing guest access
82#define GSSD_RESTART 16 // Destroy the supplied context and start over
83#define GSSD_NFS_1DES 64 // Only get single DES session keys
84#define GSSD_WIN2K_HACK 128 // Hack for Win2K
85#define GSSD_LUCID_CONTEXT 256 // Export Lucid context
86
87#endif /* _GSSD_MACH_TYPES_H_ */
88