]> git.saurik.com Git - apple/xnu.git/blob - osfmk/gssd/gssd_mach_types.h
6015ea89c565bc4cf9530aebce7da668d6b27656
[apple/xnu.git] / osfmk / gssd / gssd_mach_types.h
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
35 typedef 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
43 typedef 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
58 typedef char *gssd_string;
59 typedef char *gssd_dstring;
60 typedef uint8_t *gssd_byte_buffer;
61 typedef uint32_t *gssd_gid_list;
62 typedef uint64_t gssd_ctx;
63 typedef uint64_t gssd_cred;
64
65 /* The following need to correspond to GSS_C_*_FLAG in gssapi.h */
66 #define GSSD_DELEG_FLAG 1
67 #define GSSD_MUTUAL_FLAG 2
68 #define GSSD_REPLAY_FLAG 4
69 #define GSSD_SEQUENCE_FLAG 8
70 #define GSSD_CONF_FLAG 16
71 #define GSSD_INTEG_FLAG 32
72 #define GSSD_ANON_FLAG 64
73 #define GSSD_PROT_FLAG 128
74 #define GSSD_TRANS_FLAG 256
75 #define GSSD_DELEG_POLICY_FLAG 32768
76
77 #define GSSD_NO_DEFAULT 1 // Only use the supplied principal, do not fallback to the default.
78 #define GSSD_NO_CANON 2 // Don't canononicalize host names
79 #define GSSD_HOME_ACCESS_OK 4 // OK to access home directory
80 #define GSSD_GUEST_ONLY 8 // NTLM Server is forcing guest access
81 #define GSSD_RESTART 16 // Destroy the supplied context and start over
82 #define GSSD_NFS_1DES 64 // Only get single DES session keys
83 #define GSSD_WIN2K_HACK 128 // Hack for Win2K
84
85
86 #endif /* _GSSD_MACH_TYPES_H_ */