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