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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef __KADM5_CLIENT_INTERNAL_H__
#define __KADM5_CLIENT_INTERNAL_H__
/*
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
*
* Openvision retains the copyright to derivative works of
* this source code. Do *NOT* create a derivative of this
* source code before consulting with your legal department.
* Do *NOT* integrate *ANY* of this source code into another
* product before consulting with your legal department.
*
* For further information, read the top-level Openvision
* copyright which is contained in the top-level MIT Kerberos
* copyright.
*
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
*
*/
/*
* Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved
*
* $Header$
*
* $Log$
* Revision 1.1 1996/07/24 22:22:43 tlyu
* * Makefile.in, configure.in: break out client lib into a
* subdirectory
*
* Revision 1.11 1996/07/22 20:35:46 marc
* this commit includes all the changes on the OV_9510_INTEGRATION and
* OV_MERGE branches. This includes, but is not limited to, the new openvision
* admin system, and major changes to gssapi to add functionality, and bring
* the implementation in line with rfc1964. before committing, the
* code was built and tested for netbsd and solaris.
*
* Revision 1.10.4.1 1996/07/18 03:08:37 marc
* merged in changes from OV_9510_BP to OV_9510_FINAL1
*
* Revision 1.10.2.1 1996/06/20 02:16:46 marc
* File added to the repository on a branch
*
* Revision 1.10 1996/06/06 20:09:16 bjaspan
* add destroy_cache, for kadm5_init_with_creds
*
* Revision 1.9 1996/05/30 21:04:42 bjaspan
* add lhandle to handle
*
* Revision 1.8 1996/05/28 20:33:49 bjaspan
* rework kadm5_config
*
* Revision 1.7 1996/05/17 21:36:59 bjaspan
* rename to kadm5, begin implementing version 2
*
* Revision 1.6 1996/05/16 21:45:07 bjaspan
* add context
*
* Revision 1.5 1996/05/08 21:10:23 bjaspan
* marc's changes
*
* Revision 1.4 1996/01/16 20:54:30 grier
* secure/3570 use krb5_ui_4 not unsigned int
*
* Revision 1.3 1995/11/14 17:48:57 grier
* long to int
*
* Revision 1.2 1994/08/16 18:53:47 jik
* Versioning stuff.
*
* Revision 1.1 1994/08/09 21:14:38 jik
* Initial revision
*
*/
/*
* This header file is used internally by the Admin API client
* libraries. IF YOU THINK YOU NEED TO USE THIS FILE FOR ANYTHING,
* YOU'RE ALMOST CERTAINLY WRONG.
*/
#ifdef __cplusplus
extern "C" {
#endif
#include "admin_internal.h"
typedef struct _kadm5_server_handle_t {
krb5_ui_4 magic_number;
krb5_ui_4 struct_version;
krb5_ui_4 api_version;
char * cache_name;
int destroy_cache;
CLIENT * clnt;
krb5_context context;
/* Solaris Kerberos */
gss_cred_id_t my_cred;
kadm5_config_params params;
struct _kadm5_server_handle_t *lhandle;
} kadm5_server_handle_rec, *kadm5_server_handle_t;
#define CLIENT_CHECK_HANDLE(handle) \
{ \
kadm5_server_handle_t srvr = \
(kadm5_server_handle_t) handle; \
\
if (srvr->params.kpasswd_protocol == KRB5_CHGPWD_RPCSEC && ! srvr->clnt) \
return KADM5_BAD_SERVER_HANDLE; \
if (! srvr->cache_name) \
return KADM5_BAD_SERVER_HANDLE; \
if (! srvr->lhandle) \
return KADM5_BAD_SERVER_HANDLE; \
}
#define CHECK_HANDLE(handle) \
GENERIC_CHECK_HANDLE(handle, KADM5_OLD_LIB_API_VERSION, \
KADM5_NEW_LIB_API_VERSION) \
CLIENT_CHECK_HANDLE(handle)
#ifdef __cplusplus
}
#endif
#endif /* __KADM5_CLIENT_INTERNAL_H__ */
|