~ubuntu-branches/ubuntu/maverick/krb5/maverick

« back to all changes in this revision

Viewing changes to src/windows/identity/plugins/krb5/krbcred.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-10-30 10:28:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20061030102853-x7v876vw4af46v0m
Tags: 1.4.4-3ubuntu1
* Merge with Debian; only Ubuntu change:
  - src/include/k5-thread.h: Define__USE_GNU when #include'ing pthread.h to
    fix FTBFS (from 1.4.3-9ubuntu1).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2004 Massachusetts Institute of Technology
 
2
 * Copyright (c) 2005 Massachusetts Institute of Technology
3
3
 *
4
4
 * Permission is hereby granted, free of charge, to any person
5
5
 * obtaining a copy of this software and associated documentation
35
35
#define KHERR_FACILITY k5_facility
36
36
#define KHERR_FACILITY_ID 64
37
37
 
38
 
#include<khdefs.h>
39
 
#include<kcreddb.h>
40
 
#include<kmm.h>
41
 
#include<kconfig.h>
42
 
#include<khuidefs.h>
43
 
#include<kherr.h>
 
38
#include<netidmgr.h>
44
39
 
45
40
#include<krb5funcs.h>
46
41
#include<krb5common.h>
51
46
#include<datarep.h>
52
47
#include<krb5_msgs.h>
53
48
 
 
49
typedef enum tag_k5_lsa_import {
 
50
    K5_LSAIMPORT_NEVER = 0,
 
51
    K5_LSAIMPORT_ALWAYS = 1,
 
52
    K5_LSAIMPORT_MATCH = 2,     /* only when the principal name matches */
 
53
} k5_lsa_import;
 
54
 
54
55
#define TYPENAME_ENCTYPE        L"EncType"
55
56
#define TYPENAME_ADDR_LIST      L"AddrList"
56
57
#define TYPENAME_KRB5_FLAGS     L"Krb5Flags"
 
58
#define TYPENAME_KRB5_PRINC     L"Krb5Principal"
 
59
#define TYPENAME_KVNO           L"Kvno"
57
60
 
58
61
#define ATTRNAME_KEY_ENCTYPE    L"KeyEncType"
59
62
#define ATTRNAME_TKT_ENCTYPE    L"TktEncType"
60
63
#define ATTRNAME_ADDR_LIST      L"AddrList"
61
64
#define ATTRNAME_KRB5_FLAGS     L"Krb5Flags"
62
65
#define ATTRNAME_KRB5_CCNAME    L"Krb5CCName"
 
66
#define ATTRNAME_KVNO           L"Kvno"
63
67
 
64
68
void init_krb();
65
69
void exit_krb();
75
79
extern khm_int32 type_id_enctype;
76
80
extern khm_int32 type_id_addr_list;
77
81
extern khm_int32 type_id_krb5_flags;
 
82
extern khm_int32 type_id_krb5_princ;
 
83
extern khm_int32 type_id_kvno;
 
84
 
 
85
extern BOOL      type_regd_krb5_princ;
78
86
 
79
87
extern khm_int32 attr_id_key_enctype;
80
88
extern khm_int32 attr_id_tkt_enctype;
81
89
extern khm_int32 attr_id_addr_list;
82
90
extern khm_int32 attr_id_krb5_flags;
83
91
extern khm_int32 attr_id_krb5_ccname;
 
92
extern khm_int32 attr_id_kvno;
 
93
 
 
94
extern khm_ui_4  k5_commctl_version;
 
95
 
 
96
#define IS_COMMCTL6() (k5_commctl_version >= 0x60000)
84
97
 
85
98
/* Configuration spaces */
86
99
#define CSNAME_KRB5CRED      L"Krb5Cred"
87
100
#define CSNAME_PARAMS        L"Parameters"
88
101
#define CSNAME_PROMPTCACHE   L"PromptCache"
 
102
#define CSNAME_REALMS        L"Realms"
89
103
 
90
104
/* plugin constants */
91
105
#define KRB5_PLUGIN_NAME    L"Krb5Cred"
 
106
#define KRB5_IDENTPRO_NAME  L"Krb5Ident"
92
107
 
93
108
#define KRB5_CREDTYPE_NAME  L"Krb5Cred"
94
109
 
 
110
/* limits */
 
111
/* maximum number of characters in a realm name */
 
112
#define K5_MAXCCH_REALM 256
 
113
 
 
114
/* maximum number of characters in a host name */
 
115
#define K5_MAXCCH_HOST  128
 
116
 
 
117
/* maximum number of KDC's per realm */
 
118
#define K5_MAX_KDC      64
 
119
 
 
120
/* maximum number of domains that map to a realm */
 
121
#define K5_MAX_DOMAIN_MAPPINGS 32
 
122
 
95
123
extern khm_handle csp_plugins;
96
124
extern khm_handle csp_krbcred;
97
125
extern khm_handle csp_params;
113
141
 
114
142
/* plugin callbacks */
115
143
khm_int32 KHMAPI k5_msg_callback(khm_int32 msg_type, khm_int32 msg_subtype, khm_ui_4 uparam, void * vparam);
 
144
khm_int32 KHMAPI k5_ident_callback(khm_int32 msg_type, khm_int32 msg_subtype, khm_ui_4 uparam, void * vparam);
116
145
 
117
146
/* kinit fiber */
118
147
typedef struct _fiber_job_t {
139
168
    int     prompt_set;
140
169
 
141
170
    BOOL    null_password;
 
171
    BOOL    valid_principal;
142
172
} fiber_job;
143
173
 
144
174
extern fiber_job g_fjob;   /* global fiber job object */
150
180
#define FIBER_STATE_NONE    0
151
181
#define FIBER_STATE_KINIT   1
152
182
 
 
183
#define K5_SET_CRED_MSG     WMNC_USER
 
184
 
153
185
void 
154
186
k5_pp_begin(khui_property_sheet * s);
155
187
 
179
211
void
180
212
k5_unregister_config_panels(void);
181
213
 
 
214
INT_PTR CALLBACK 
 
215
k5_ccconfig_dlgproc(HWND hwnd,
 
216
                    UINT uMsg,
 
217
                    WPARAM wParam,
 
218
                    LPARAM lParam);
 
219
 
 
220
INT_PTR CALLBACK 
 
221
k5_id_tab_dlgproc(HWND hwndDlg,
 
222
                  UINT uMsg,
 
223
                  WPARAM wParam,
 
224
                  LPARAM lParam);
 
225
 
 
226
INT_PTR CALLBACK 
 
227
k5_ids_tab_dlgproc(HWND hwnd,
 
228
                   UINT uMsg,
 
229
                   WPARAM wParam,
 
230
                   LPARAM lParam);
 
231
 
182
232
#endif