195 const sasl_callback_t *callbacks;
196 const sasl_global_callbacks_t *global_callbacks; /* global callbacks
197 * connection */
198 char *serverFQDN;
199
200 /* Pointers to memory that we are responsible for */
201 buffer_info_t *encode_buf;
202
203 int error_code;
204 char *error_buf, *errdetail_buf;
205 size_t error_buf_len, errdetail_buf_len;
206 char *mechlist_buf;
207 size_t mechlist_buf_len;
208
209 char *decode_buf;
210
211 char user_buf[CANON_BUF_SIZE+1], authid_buf[CANON_BUF_SIZE+1];
212
213 #ifdef _SUN_SDK_
214 struct _sasl_global_context_s *gctx;
215 /* EXPORT DELETE START */
216 /* CRYPT DELETE START */
217 #ifdef _INTEGRATED_SOLARIS_
218 int sun_reg;
219 #endif /* _INTEGRATED_SOLARIS_ */
220 /* CRYPT DELETE END */
221 /* EXPORT DELETE END */
222 #endif /* _SUN_SDK_ */
223 };
224
225 #ifdef _SUN_SDK_
226 /* track changes in file system */
227 typedef struct _sasl_path_info {
228 char *path;
229 time_t last_changed;
230 struct _sasl_path_info *next;
231 } _sasl_path_info_t;
232 #endif /* _SUN_SDK_ */
233
234 /* Server Conn Type Information */
235
236 typedef struct mechanism
237 {
238 int version;
239 int condition; /* set to SASL_NOUSER if no available users;
240 set to SASL_CONTINUE if delayed plugn loading */
241 char *plugname; /* for AUTHSOURCE tracking */
242 #ifdef _SUN_SDK_
243 /* EXPORT DELETE START */
244 /* CRYPT DELETE START */
245 #ifdef _INTEGRATED_SOLARIS_
246 int sun_reg;
247 #endif /* _INTEGRATED_SOLARIS_ */
248 /* CRYPT DELETE END */
249 /* EXPORT DELETE END */
250 sasl_server_plug_t *plug;
251 /*
252 * The global context needs to be stored with separately from the
253 * the plugin because it will be overwritten when the plugin is
254 * relloaded
255 */
256 void *glob_context;
257 struct mechanism *next;
258 #else
259 const sasl_server_plug_t *plug;
260 struct mechanism *next;
261 char *f; /* where should i load the mechanism from? */
262 #endif /* _SUN_SDK_ */
263 } mechanism_t;
264
265 typedef struct mech_list {
266 const sasl_utils_t *utils; /* gotten from plug_init */
267
268 void *mutex; /* mutex for this data */
269 mechanism_t *mech_list; /* list of mechanisms */
281
282 typedef struct sasl_server_conn {
283 sasl_conn_t base; /* parts common to server + client */
284
285 char *user_realm; /* domain the user authenticating is in */
286 int sent_last; /* Have we already done the last send? */
287 int authenticated;
288 mechanism_t *mech; /* mechanism trying to use */
289 sasl_server_params_t *sparams;
290 context_list_t *mech_contexts;
291 } sasl_server_conn_t;
292
293 /* Client Conn Type Information */
294
295 typedef struct cmechanism
296 {
297 int version;
298
299 char *plugname;
300 #ifdef _SUN_SDK_
301 /* EXPORT DELETE START */
302 /* CRYPT DELETE START */
303 #ifdef _INTEGRATED_SOLARIS_
304 int sun_reg;
305 #endif /* _INTEGRATED_SOLARIS_ */
306 /* CRYPT DELETE END */
307 /* EXPORT DELETE END */
308 /*
309 * The global context needs to be stored with separately from the
310 * the plugin because it will be overwritten when the plugin is
311 * relloaded
312 */
313 void *glob_context;
314 sasl_client_plug_t *plug;
315 #else
316 const sasl_client_plug_t *plug;
317 #endif /* _SUN_SDK_ */
318
319 struct cmechanism *next;
320 } cmechanism_t;
321
322 typedef struct cmech_list {
323 const sasl_utils_t *utils;
324
325 void *mutex; /* mutex for this data */
326 cmechanism_t *mech_list; /* list of mechanisms */
327 int mech_length; /* number of mechanisms */
786 const char *ipremoteport,
787 const sasl_callback_t *prompt_supp,
788 unsigned flags,
789 sasl_conn_t **pconn);
790
791 extern int _sasl_client_add_plugin(void *ctx,
792 const char *plugname,
793 sasl_client_plug_init_t *cplugfunc);
794 extern int _sasl_server_add_plugin(void *ctx,
795 const char *plugname,
796 sasl_server_plug_init_t *splugfunc);
797 extern int _sasl_canonuser_add_plugin(void *ctx,
798 const char *plugname,
799 sasl_canonuser_init_t *canonuserfunc);
800 extern int _sasl_auxprop_add_plugin(void *ctx,
801 const char *plugname,
802 sasl_auxprop_init_t *auxpropfunc);
803
804 _sasl_global_context_t *_sasl_gbl_ctx(void);
805
806 /* EXPORT DELETE START */
807 /* CRYPT DELETE START */
808 #ifdef _INTEGRATED_SOLARIS_
809 int _is_sun_reg(void *mech);
810 #endif /* _INTEGRATED_SOLARIS_ */
811 /* CRYPT DELETE END */
812 /* EXPORT DELETE END */
813
814 /* unsupported functions that are used internally */
815 int sasl_randcreate(sasl_rand_t **rpool);
816
817 void sasl_randfree(sasl_rand_t **rpool);
818
819 void sasl_rand(sasl_rand_t *rpool, char *buf, unsigned len);
820
821 void sasl_churn(sasl_rand_t *rpool, const char *data, unsigned len);
822
823 int sasl_mkchal(sasl_conn_t *conn, char *buf, unsigned maxlen,
824 unsigned hostflag);
825 #endif /* _SUN_SDK_ */
826
827 #endif /* SASLINT_H */
|
195 const sasl_callback_t *callbacks;
196 const sasl_global_callbacks_t *global_callbacks; /* global callbacks
197 * connection */
198 char *serverFQDN;
199
200 /* Pointers to memory that we are responsible for */
201 buffer_info_t *encode_buf;
202
203 int error_code;
204 char *error_buf, *errdetail_buf;
205 size_t error_buf_len, errdetail_buf_len;
206 char *mechlist_buf;
207 size_t mechlist_buf_len;
208
209 char *decode_buf;
210
211 char user_buf[CANON_BUF_SIZE+1], authid_buf[CANON_BUF_SIZE+1];
212
213 #ifdef _SUN_SDK_
214 struct _sasl_global_context_s *gctx;
215 #ifdef _INTEGRATED_SOLARIS_
216 int sun_reg;
217 #endif /* _INTEGRATED_SOLARIS_ */
218 #endif /* _SUN_SDK_ */
219 };
220
221 #ifdef _SUN_SDK_
222 /* track changes in file system */
223 typedef struct _sasl_path_info {
224 char *path;
225 time_t last_changed;
226 struct _sasl_path_info *next;
227 } _sasl_path_info_t;
228 #endif /* _SUN_SDK_ */
229
230 /* Server Conn Type Information */
231
232 typedef struct mechanism
233 {
234 int version;
235 int condition; /* set to SASL_NOUSER if no available users;
236 set to SASL_CONTINUE if delayed plugn loading */
237 char *plugname; /* for AUTHSOURCE tracking */
238 #ifdef _SUN_SDK_
239 #ifdef _INTEGRATED_SOLARIS_
240 int sun_reg;
241 #endif /* _INTEGRATED_SOLARIS_ */
242 sasl_server_plug_t *plug;
243 /*
244 * The global context needs to be stored with separately from the
245 * the plugin because it will be overwritten when the plugin is
246 * relloaded
247 */
248 void *glob_context;
249 struct mechanism *next;
250 #else
251 const sasl_server_plug_t *plug;
252 struct mechanism *next;
253 char *f; /* where should i load the mechanism from? */
254 #endif /* _SUN_SDK_ */
255 } mechanism_t;
256
257 typedef struct mech_list {
258 const sasl_utils_t *utils; /* gotten from plug_init */
259
260 void *mutex; /* mutex for this data */
261 mechanism_t *mech_list; /* list of mechanisms */
273
274 typedef struct sasl_server_conn {
275 sasl_conn_t base; /* parts common to server + client */
276
277 char *user_realm; /* domain the user authenticating is in */
278 int sent_last; /* Have we already done the last send? */
279 int authenticated;
280 mechanism_t *mech; /* mechanism trying to use */
281 sasl_server_params_t *sparams;
282 context_list_t *mech_contexts;
283 } sasl_server_conn_t;
284
285 /* Client Conn Type Information */
286
287 typedef struct cmechanism
288 {
289 int version;
290
291 char *plugname;
292 #ifdef _SUN_SDK_
293 #ifdef _INTEGRATED_SOLARIS_
294 int sun_reg;
295 #endif /* _INTEGRATED_SOLARIS_ */
296 /*
297 * The global context needs to be stored with separately from the
298 * the plugin because it will be overwritten when the plugin is
299 * relloaded
300 */
301 void *glob_context;
302 sasl_client_plug_t *plug;
303 #else
304 const sasl_client_plug_t *plug;
305 #endif /* _SUN_SDK_ */
306
307 struct cmechanism *next;
308 } cmechanism_t;
309
310 typedef struct cmech_list {
311 const sasl_utils_t *utils;
312
313 void *mutex; /* mutex for this data */
314 cmechanism_t *mech_list; /* list of mechanisms */
315 int mech_length; /* number of mechanisms */
774 const char *ipremoteport,
775 const sasl_callback_t *prompt_supp,
776 unsigned flags,
777 sasl_conn_t **pconn);
778
779 extern int _sasl_client_add_plugin(void *ctx,
780 const char *plugname,
781 sasl_client_plug_init_t *cplugfunc);
782 extern int _sasl_server_add_plugin(void *ctx,
783 const char *plugname,
784 sasl_server_plug_init_t *splugfunc);
785 extern int _sasl_canonuser_add_plugin(void *ctx,
786 const char *plugname,
787 sasl_canonuser_init_t *canonuserfunc);
788 extern int _sasl_auxprop_add_plugin(void *ctx,
789 const char *plugname,
790 sasl_auxprop_init_t *auxpropfunc);
791
792 _sasl_global_context_t *_sasl_gbl_ctx(void);
793
794 #ifdef _INTEGRATED_SOLARIS_
795 int _is_sun_reg(void *mech);
796 #endif /* _INTEGRATED_SOLARIS_ */
797
798 /* unsupported functions that are used internally */
799 int sasl_randcreate(sasl_rand_t **rpool);
800
801 void sasl_randfree(sasl_rand_t **rpool);
802
803 void sasl_rand(sasl_rand_t *rpool, char *buf, unsigned len);
804
805 void sasl_churn(sasl_rand_t *rpool, const char *data, unsigned len);
806
807 int sasl_mkchal(sasl_conn_t *conn, char *buf, unsigned maxlen,
808 unsigned hostflag);
809 #endif /* _SUN_SDK_ */
810
811 #endif /* SASLINT_H */
|