xref: /freebsd/crypto/heimdal/lib/kadm5/client_glue.c (revision 0a36787e4c1fa0cf77dcf83be0867178476e372b)
1 /*
2  * Copyright (c) 1997 Kungliga Tekniska Högskolan
3  * (Royal Institute of Technology, Stockholm, Sweden).
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  *
17  * 3. Neither the name of the Institute nor the names of its contributors
18  *    may be used to endorse or promote products derived from this software
19  *    without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  */
33 
34 #include "kadm5_locl.h"
35 
36 RCSID("$Id$");
37 
38 kadm5_ret_t
39 kadm5_init_with_password(const char *client_name,
40 			 const char *password,
41 			 const char *service_name,
42 			 kadm5_config_params *realm_params,
43 			 unsigned long struct_version,
44 			 unsigned long api_version,
45 			 void **server_handle)
46 {
47     return kadm5_c_init_with_password(client_name,
48 				      password,
49 				      service_name,
50 				      realm_params,
51 				      struct_version,
52 				      api_version,
53 				      server_handle);
54 }
55 
56 kadm5_ret_t
57 kadm5_init_with_password_ctx(krb5_context context,
58 			     const char *client_name,
59 			     const char *password,
60 			     const char *service_name,
61 			     kadm5_config_params *realm_params,
62 			     unsigned long struct_version,
63 			     unsigned long api_version,
64 			     void **server_handle)
65 {
66     return kadm5_c_init_with_password_ctx(context,
67 					  client_name,
68 					  password,
69 					  service_name,
70 					  realm_params,
71 					  struct_version,
72 					  api_version,
73 					  server_handle);
74 }
75 
76 kadm5_ret_t
77 kadm5_init_with_skey(const char *client_name,
78 		     const char *keytab,
79 		     const char *service_name,
80 		     kadm5_config_params *realm_params,
81 		     unsigned long struct_version,
82 		     unsigned long api_version,
83 		     void **server_handle)
84 {
85     return kadm5_c_init_with_skey(client_name,
86 				  keytab,
87 				  service_name,
88 				  realm_params,
89 				  struct_version,
90 				  api_version,
91 				  server_handle);
92 }
93 
94 kadm5_ret_t
95 kadm5_init_with_skey_ctx(krb5_context context,
96 			 const char *client_name,
97 			 const char *keytab,
98 			 const char *service_name,
99 			 kadm5_config_params *realm_params,
100 			 unsigned long struct_version,
101 			 unsigned long api_version,
102 			 void **server_handle)
103 {
104     return kadm5_c_init_with_skey_ctx(context,
105 				      client_name,
106 				      keytab,
107 				      service_name,
108 				      realm_params,
109 				      struct_version,
110 				      api_version,
111 				      server_handle);
112 }
113 
114 kadm5_ret_t
115 kadm5_init_with_creds(const char *client_name,
116 		      krb5_ccache ccache,
117 		      const char *service_name,
118 		      kadm5_config_params *realm_params,
119 		      unsigned long struct_version,
120 		      unsigned long api_version,
121 		      void **server_handle)
122 {
123     return kadm5_c_init_with_creds(client_name,
124 				   ccache,
125 				   service_name,
126 				   realm_params,
127 				   struct_version,
128 				   api_version,
129 				   server_handle);
130 }
131 
132 kadm5_ret_t
133 kadm5_init_with_creds_ctx(krb5_context context,
134 			  const char *client_name,
135 			  krb5_ccache ccache,
136 			  const char *service_name,
137 			  kadm5_config_params *realm_params,
138 			  unsigned long struct_version,
139 			  unsigned long api_version,
140 			  void **server_handle)
141 {
142     return kadm5_c_init_with_creds_ctx(context,
143 				       client_name,
144 				       ccache,
145 				       service_name,
146 				       realm_params,
147 				       struct_version,
148 				       api_version,
149 				       server_handle);
150 }
151