xref: /titanic_50/usr/src/lib/krb5/plugins/kdb/ldap/libkdb_ldap/ldap_realm.h (revision 54925bf60766fbb4f1f2d7c843721406a7b7a3fb)
1 /*
2  * lib/kdb/kdb_ldap/ldap_realm.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_REALM_H
32 #define _LDAP_REALM_H 1
33 
34 #pragma ident	"%Z%%M%	%I%	%E% SMI"
35 
36 /* realm specific mask */
37 #define LDAP_REALM_SUBTREE            0x0001
38 #define LDAP_REALM_SEARCHSCOPE        0x0002
39 #define LDAP_REALM_POLICYREFERENCE    0x0004
40 #define LDAP_REALM_UPENABLED          0x0008
41 #define LDAP_REALM_LDAPSERVERS        0x0010
42 #define LDAP_REALM_KDCSERVERS         0x0020
43 #define LDAP_REALM_ADMINSERVERS       0x0040
44 #define LDAP_REALM_PASSWDSERVERS      0x0080
45 #define LDAP_REALM_MAXTICKETLIFE      0x0100
46 #define LDAP_REALM_MAXRENEWLIFE       0x0200
47 #define LDAP_REALM_KRBTICKETFLAGS     0x0400
48 #define LDAP_REALM_CONTREF  	      0x0800
49 
50 extern char *policy_attributes[];
51 
52 extern char *realm_attributes[];
53 
54 /* realm container structure */
55 
56 typedef struct _krb5_ldap_realm_params {
57   char          *realmdn;
58   char          *realm_name;
59   char          **subtree;
60   char		*containerref;
61   char          *policyreference;
62   int           search_scope;
63   int           upenabled;
64   int 		subtreecount;
65   krb5_int32    max_life;
66   krb5_int32    max_renewable_life;
67   krb5_int32    tktflags;
68   char          **kdcservers;
69   char          **adminservers;
70   char          **passwdservers;
71   krb5_tl_data  *tl_data;
72   krb5_keyblock mkey;
73   long          mask;
74 } krb5_ldap_realm_params;
75 
76 
77 krb5_error_code
78 krb5_ldap_list_realm(krb5_context , char ***);
79 
80 krb5_error_code
81 krb5_ldap_delete_realm(krb5_context, char *);
82 
83 krb5_error_code
84 krb5_ldap_modify_realm(krb5_context, krb5_ldap_realm_params *, int);
85 
86 krb5_error_code
87 krb5_ldap_create_realm(krb5_context, krb5_ldap_realm_params *, int);
88 
89 krb5_error_code
90 krb5_ldap_read_realm_params(krb5_context , char *, krb5_ldap_realm_params **, int *);
91 
92 void
93 krb5_ldap_free_realm_params(krb5_ldap_realm_params *);
94 
95 krb5_error_code
96 krb5_ldap_delete_realm_1(krb5_context, char *, char **);
97 
98 char *
99 ldap_filter_correct(char *);
100 
101 #endif
102