~ubuntu-branches/ubuntu/precise/krb5/precise-updates

« back to all changes in this revision

Viewing changes to src/windows/identity/kherr/kherrinternal.h

  • Committer: Package Import Robot
  • Author(s): Sam Hartman
  • Date: 2011-12-01 19:34:41 UTC
  • mfrom: (28.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20111201193441-9tipg3aru1jsidyv
Tags: 1.10+dfsg~alpha1-6
* Fix segfault with unknown hostnames in krb5_sname_to_principal,
  Closes: #650671
* Indicate that this library breaks libsmbclient versions that depend on
  krb5_locate_kdc, Closes: #650603, #650611

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (c) 2005 Massachusetts Institute of Technology
3
 
 *
4
 
 * Permission is hereby granted, free of charge, to any person
5
 
 * obtaining a copy of this software and associated documentation
6
 
 * files (the "Software"), to deal in the Software without
7
 
 * restriction, including without limitation the rights to use, copy,
8
 
 * modify, merge, publish, distribute, sublicense, and/or sell copies
9
 
 * of the Software, and to permit persons to whom the Software is
10
 
 * furnished to do so, subject to the following conditions:
11
 
 *
12
 
 * The above copyright notice and this permission notice shall be
13
 
 * included in all copies or substantial portions of the Software.
14
 
 *
15
 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
 
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
 
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
 
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19
 
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20
 
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
 
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
 
 * SOFTWARE.
23
 
 */
24
 
 
25
 
/* $Id$ */
26
 
 
27
 
#ifndef __KHIMAIRA_KHERRORINTERNAL_H
28
 
#define __KHIMAIRA_KHERRORINTERNAL_H
29
 
 
30
 
#define _NIMLIB_
31
 
 
32
 
#include<windows.h>
33
 
#include<kherr.h>
34
 
#include<utils.h>
35
 
#include<strsafe.h>
36
 
 
37
 
#define IS_KHERR_CTX(c) ((c) && (c)->magic == KHERR_CONTEXT_MAGIC)
38
 
#define IS_KHERR_EVENT(e) ((e) && (e)->magic == KHERR_EVENT_MAGIC)
39
 
 
40
 
typedef struct tag_kherr_thread {
41
 
    khm_size nc_ctx;
42
 
    khm_size n_ctx;
43
 
    kherr_context ** ctx;
44
 
} kherr_thread;
45
 
 
46
 
#define THREAD_STACK_SIZE 8
47
 
 
48
 
typedef struct tag_kherr_handler_node {
49
 
    khm_int32         filter;
50
 
    kherr_ctx_handler h;
51
 
    kherr_serial      serial;
52
 
} kherr_handler_node;
53
 
 
54
 
#define CTX_ALLOC_INCR 4
55
 
 
56
 
#define EVENT_MASK_UNRESOLVED \
57
 
    (KHERR_RF_RES_SHORT_DESC|KHERR_RF_MSG_SHORT_DESC| \
58
 
    KHERR_RF_RES_LONG_DESC|KHERR_RF_MSG_LONG_DESC| \
59
 
    KHERR_RF_RES_SUGGEST|KHERR_RF_MSG_SUGGEST)
60
 
 
61
 
extern CRITICAL_SECTION cs_error;
62
 
extern DWORD tls_error;
63
 
extern kherr_context * ctx_free_list;
64
 
extern kherr_event * evt_free_list;
65
 
extern kherr_handler_node * ctx_handlers;
66
 
extern khm_size n_ctx_handlers;
67
 
 
68
 
#define parm_type(p) ((p).type)
69
 
#define parm_data(p) ((p).data)
70
 
 
71
 
void resolve_event_strings(kherr_event *);
72
 
void attach_this_thread(void);
73
 
void detach_this_thread(void);
74
 
#endif