]>
Commit | Line | Data |
---|---|---|
61a2844b | 1 | /* |
2 | * Copyright (C) 1998-2000 Luke Howard. All rights reserved. | |
3 | * CONFIDENTIAL | |
4 | * $Id$ | |
5 | * | |
6 | * Structures for handling GSS-API binds within LDAP client | |
7 | * and server libraries. This isn't entirely SASL specific, | |
8 | * apart from the negotiation state. | |
9 | */ | |
10 | ||
11 | #ifndef _GSSLDAP_INT_H_ | |
12 | #define _GSSLDAP_INT_H_ | |
13 | ||
14 | #define GSSAPI_LDAP_PRINCIPAL_ATTRIBUTE "krbName" | |
15 | #define GSSAPI_LDAP_SERVICE_NAME "ldap" | |
16 | #define GSSAPI_LDAP_DN_PREFIX "dn:" | |
17 | #define GSSAPI_LDAP_DN_PREFIX_LEN (sizeof(GSSAPI_LDAP_DN_PREFIX) - 1) | |
18 | ||
19 | #include "gsssasl.h" | |
20 | #include "gssldap.h" | |
21 | ||
22 | /* | |
23 | * GSS-API SASL negotiation state for the client library | |
24 | */ | |
25 | typedef struct gssldap_client_state_desc { | |
26 | /* LDAP handle */ | |
27 | LDAP *ld; | |
28 | ||
29 | /* dn passed to ldap_gssapi_bind() */ | |
30 | const char *binddn; | |
31 | ||
32 | /* msgid for bind conversation */ | |
33 | int msgid; | |
34 | ||
35 | /* GSS-API context */ | |
36 | gss_ctx_id_t context; | |
37 | ||
38 | /* result code to return from ldap_gssapi_bind() */ | |
39 | int rc; | |
40 | } gssldap_client_state_desc, *gssldap_client_state_t; | |
41 | ||
42 | /* | |
43 | * Plugin (server side) state | |
44 | */ | |
45 | typedef struct gssldap_server_state_desc { | |
46 | /* The LDAP connection */ | |
47 | int conn; | |
48 | ||
49 | /* Where in the negotiation we are */ | |
50 | gsssasl_server_negotiation_desc state; | |
51 | ||
52 | /* The GSS-API context */ | |
53 | gss_ctx_id_t context; | |
54 | ||
55 | /* The client name */ | |
56 | gss_buffer_desc client_name; | |
57 | ||
58 | /* SASL authorization identity (with dn: prefix chopped) */ | |
59 | char *identity; | |
60 | ||
61 | /* The next entry in the list */ | |
62 | struct gssldap_server_state_desc *next; | |
63 | } gssldap_server_state_desc, *gssldap_server_state_t; | |
64 | ||
65 | #endif /* _GSSLDAP_INT_H_ */ |