1*54925bf6Swillf /* 2*54925bf6Swillf * lib/kdb/kdb_ldap/ldap_tkt_policy.h 3*54925bf6Swillf * 4*54925bf6Swillf * Copyright (c) 2004-2005, Novell, Inc. 5*54925bf6Swillf * All rights reserved. 6*54925bf6Swillf * 7*54925bf6Swillf * Redistribution and use in source and binary forms, with or without 8*54925bf6Swillf * modification, are permitted provided that the following conditions are met: 9*54925bf6Swillf * 10*54925bf6Swillf * * Redistributions of source code must retain the above copyright notice, 11*54925bf6Swillf * this list of conditions and the following disclaimer. 12*54925bf6Swillf * * Redistributions in binary form must reproduce the above copyright 13*54925bf6Swillf * notice, this list of conditions and the following disclaimer in the 14*54925bf6Swillf * documentation and/or other materials provided with the distribution. 15*54925bf6Swillf * * The copyright holder's name is not used to endorse or promote products 16*54925bf6Swillf * derived from this software without specific prior written permission. 17*54925bf6Swillf * 18*54925bf6Swillf * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19*54925bf6Swillf * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20*54925bf6Swillf * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21*54925bf6Swillf * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22*54925bf6Swillf * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23*54925bf6Swillf * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24*54925bf6Swillf * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25*54925bf6Swillf * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26*54925bf6Swillf * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27*54925bf6Swillf * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28*54925bf6Swillf * POSSIBILITY OF SUCH DAMAGE. 29*54925bf6Swillf */ 30*54925bf6Swillf 31*54925bf6Swillf #ifndef _LDAP_POLICY_H 32*54925bf6Swillf #define _LDAP_POLICY_H 1 33*54925bf6Swillf 34*54925bf6Swillf /* policy specific mask */ 35*54925bf6Swillf 36*54925bf6Swillf #define LDAP_POLICY_MAXTKTLIFE 0x0001 37*54925bf6Swillf #define LDAP_POLICY_MAXRENEWLIFE 0x0002 38*54925bf6Swillf #define LDAP_POLICY_TKTFLAGS 0x0004 39*54925bf6Swillf #define LDAP_POLICY_COUNT 0x0008 40*54925bf6Swillf /* policy object structure */ 41*54925bf6Swillf 42*54925bf6Swillf typedef struct _krb5_ldap_policy_params { 43*54925bf6Swillf char *policy; 44*54925bf6Swillf long mask; 45*54925bf6Swillf long maxtktlife; 46*54925bf6Swillf long maxrenewlife; 47*54925bf6Swillf long tktflags; 48*54925bf6Swillf krb5_tl_data *tl_data; 49*54925bf6Swillf }krb5_ldap_policy_params; 50*54925bf6Swillf 51*54925bf6Swillf krb5_error_code 52*54925bf6Swillf krb5_ldap_create_policy(krb5_context, krb5_ldap_policy_params *, int); 53*54925bf6Swillf 54*54925bf6Swillf krb5_error_code 55*54925bf6Swillf krb5_ldap_modify_policy(krb5_context, krb5_ldap_policy_params *, int); 56*54925bf6Swillf 57*54925bf6Swillf /* Solaris kerberos: unsigned better for mask */ 58*54925bf6Swillf krb5_error_code 59*54925bf6Swillf krb5_ldap_read_policy(krb5_context, char *, krb5_ldap_policy_params **, 60*54925bf6Swillf unsigned int *); 61*54925bf6Swillf 62*54925bf6Swillf krb5_error_code 63*54925bf6Swillf krb5_ldap_delete_policy(krb5_context, char *); 64*54925bf6Swillf 65*54925bf6Swillf krb5_error_code 66*54925bf6Swillf krb5_ldap_clear_policy(krb5_context, char *); 67*54925bf6Swillf 68*54925bf6Swillf krb5_error_code 69*54925bf6Swillf krb5_ldap_list_policy(krb5_context, char *, char ***); 70*54925bf6Swillf 71*54925bf6Swillf krb5_error_code 72*54925bf6Swillf krb5_ldap_free_policy(krb5_context, krb5_ldap_policy_params *); 73*54925bf6Swillf 74*54925bf6Swillf krb5_error_code 75*54925bf6Swillf krb5_ldap_change_count(krb5_context ,char * , int); 76*54925bf6Swillf 77*54925bf6Swillf #endif 78