1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
/*
* lib/krb5/ccache/file/fcc_ops.c
*
* Copyright 1990 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
*
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright notice and
* this permission notice appear in supporting documentation, and that
* the name of M.I.T. not be used in advertising or publicity pertaining
* to distribution of the software without specific, written prior
* permission. M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
*
*
* This file contains the structure krb5_fcc_ops.
*/
#define NEED_WINDOWS
#include "fcc.h"
krb5_cc_ops krb5_fcc_ops = {
0,
"FILE",
krb5_fcc_get_name,
krb5_fcc_resolve,
krb5_fcc_generate_new,
krb5_fcc_initialize,
krb5_fcc_destroy,
krb5_fcc_close,
krb5_fcc_store,
krb5_fcc_retrieve,
krb5_fcc_get_principal,
krb5_fcc_start_seq_get,
krb5_fcc_next_cred,
krb5_fcc_end_seq_get,
NULL, /* XXX krb5_fcc_remove, */
krb5_fcc_set_flags,
};
#if defined(_MSDOS) || defined(_WIN32)
/*
* krb5_change_cache should be called after the cache changes.
* A notification message is is posted out to all top level
* windows so that they may recheck the cache based on the
* changes made. We register a unique message type with which
* we'll communicate to all other processes.
*/
krb5_error_code
krb5_change_cache (void) {
PostMessage(HWND_BROADCAST, krb5_get_notification_message(), 0, 0);
return 0;
}
KRB5_DLLIMP unsigned int KRB5_CALLCONV
krb5_get_notification_message (void) {
static unsigned int message = 0;
if (message == 0)
message = RegisterWindowMessage(WM_KERBEROS5_CHANGED);
return message;
}
#else /* _MSDOS || _WIN32 */
krb5_error_code
krb5_change_cache ()
{
return 0;
}
unsigned int
krb5_get_notification_message ()
{
return 0;
}
#endif /* _MSDOS || _WIN32 */
|