2N/A/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2N/A/*
2N/A * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A/*
2N/A * Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved
2N/A *
2N/A * $Header$
2N/A *
2N/A * $Log$
2N/A * Revision 1.1 1996/07/24 22:22:43 tlyu
2N/A * * Makefile.in, configure.in: break out client lib into a
2N/A * subdirectory
2N/A *
2N/A * Revision 1.11 1996/07/22 20:35:46 marc
2N/A * this commit includes all the changes on the OV_9510_INTEGRATION and
2N/A * OV_MERGE branches. This includes, but is not limited to, the new openvision
2N/A * admin system, and major changes to gssapi to add functionality, and bring
2N/A * the implementation in line with rfc1964. before committing, the
2N/A * code was built and tested for netbsd and solaris.
2N/A *
2N/A * Revision 1.10.4.1 1996/07/18 03:08:37 marc
2N/A * merged in changes from OV_9510_BP to OV_9510_FINAL1
2N/A *
2N/A * Revision 1.10.2.1 1996/06/20 02:16:46 marc
2N/A * File added to the repository on a branch
2N/A *
2N/A * Revision 1.10 1996/06/06 20:09:16 bjaspan
2N/A * add destroy_cache, for kadm5_init_with_creds
2N/A *
2N/A * Revision 1.9 1996/05/30 21:04:42 bjaspan
2N/A * add lhandle to handle
2N/A *
2N/A * Revision 1.8 1996/05/28 20:33:49 bjaspan
2N/A * rework kadm5_config
2N/A *
2N/A * Revision 1.7 1996/05/17 21:36:59 bjaspan
2N/A * rename to kadm5, begin implementing version 2
2N/A *
2N/A * Revision 1.6 1996/05/16 21:45:07 bjaspan
2N/A * add context
2N/A *
2N/A * Revision 1.5 1996/05/08 21:10:23 bjaspan
2N/A * marc's changes
2N/A *
2N/A * Revision 1.4 1996/01/16 20:54:30 grier
2N/A * secure/3570 use krb5_ui_4 not unsigned int
2N/A *
2N/A * Revision 1.3 1995/11/14 17:48:57 grier
2N/A * long to int
2N/A *
2N/A * Revision 1.2 1994/08/16 18:53:47 jik
2N/A * Versioning stuff.
2N/A *
2N/A * Revision 1.1 1994/08/09 21:14:38 jik
2N/A * Initial revision
2N/A *
2N/A */
2N/A
2N/A/*
2N/A * This header file is used internally by the Admin API client
2N/A * libraries. IF YOU THINK YOU NEED TO USE THIS FILE FOR ANYTHING,
2N/A * YOU'RE ALMOST CERTAINLY WRONG.
2N/A */
2N/A
2N/A/*
2N/A * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
2N/A *
2N/A * Openvision retains the copyright to derivative works of
2N/A * this source code. Do *NOT* create a derivative of this
2N/A * source code before consulting with your legal department.
2N/A * Do *NOT* integrate *ANY* of this source code into another
2N/A * product before consulting with your legal department.
2N/A *
2N/A * For further information, read the top-level Openvision
2N/A * copyright which is contained in the top-level MIT Kerberos
2N/A * copyright.
2N/A *
2N/A * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
2N/A *
2N/A */
2N/A
2N/A#ifndef __KADM5_CLIENT_INTERNAL_H__
2N/A#define __KADM5_CLIENT_INTERNAL_H__
2N/A
2N/A#include "admin_internal.h"
2N/A
2N/Atypedef struct _kadm5_server_handle_t {
2N/A krb5_ui_4 magic_number;
2N/A krb5_ui_4 struct_version;
2N/A krb5_ui_4 api_version;
2N/A char * cache_name;
2N/A int destroy_cache;
2N/A CLIENT * clnt;
2N/A krb5_context context;
2N/A /* Solaris Kerberos */
2N/A gss_cred_id_t my_cred;
2N/A kadm5_config_params params;
2N/A struct _kadm5_server_handle_t *lhandle;
2N/A} kadm5_server_handle_rec, *kadm5_server_handle_t;
2N/A
2N/A#define CLIENT_CHECK_HANDLE(handle) \
2N/A { \
2N/A kadm5_server_handle_t srvr = \
2N/A (kadm5_server_handle_t) handle; \
2N/A \
2N/A if (srvr->params.kpasswd_protocol == KRB5_CHGPWD_RPCSEC && ! srvr->clnt) \
2N/A return KADM5_BAD_SERVER_HANDLE; \
2N/A if (! srvr->cache_name) \
2N/A return KADM5_BAD_SERVER_HANDLE; \
2N/A if (! srvr->lhandle) \
2N/A return KADM5_BAD_SERVER_HANDLE; \
2N/A }
2N/A
2N/A#define CHECK_HANDLE(handle) \
2N/A GENERIC_CHECK_HANDLE(handle, KADM5_OLD_LIB_API_VERSION, \
2N/A KADM5_NEW_LIB_API_VERSION) \
2N/A CLIENT_CHECK_HANDLE(handle)
2N/A
2N/A#endif /* __KADM5_CLIENT_INTERNAL_H__ */