xref: /titanic_52/usr/src/lib/libnisdb/ldap_glob.h (revision 8d0852b7f8176b2c281cc944010af2b0fecf9fb2)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 2001 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef	_LDAP_GLOB_H
28 #define	_LDAP_GLOB_H
29 
30 #include <stdio.h>
31 #include <rpcsvc/nis.h>
32 
33 #ifdef	__cplusplus
34 extern "C" {
35 #endif
36 
37 /*
38  * The following may be defined and set by the application. If not,
39  * we'll use local equivalents that disable the feature.
40  */
41 extern int	verbose;
42 extern int	justTesting;
43 extern FILE	*cons;
44 extern int	setColumnsDuringConfig;
45 
46 /*
47  * Functions that reside in rpc.nisd. We provide local do-nothing-return-
48  * failure incarnations that are there strictly to prevent a link error.
49  * If libnisdb calls one of these, we had better be running inside rpc.nisd.
50  */
51 extern int		update_root_object(nis_name root_dir,
52 				nis_object *d_obj);
53 extern nis_object	*get_root_object(void);
54 extern int		remove_root_object(nis_name root_dir,
55 				nis_object* d_obj);
56 extern int		beginTransaction(void);
57 extern int		abort_transaction(int xid);
58 extern int		endTransaction(int xid, nis_object *dirObj);
59 extern int		addUpdate(log_entry_t type, char *name,
60 				int numAttr, nis_attr *attr, nis_object *obj,
61 				nis_object *oldDir, uint32_t ttime);
62 extern int		lockTransLog(const char *msg, int wr, int trylock);
63 extern void		unlockTransLog(const char *msg, int wr);
64 extern int		__nis_lock_db_table(nis_name name, int readwrite,
65 						int *trylock, const char *msg);
66 extern int		__nis_ulock_db_table(nis_name name, int readwrite,
67 						int remove, const char *msg);
68 
69 #ifdef	__cplusplus
70 }
71 #endif	/* __cplusplus */
72 
73 #endif	/* _LDAP_GLOB_H */
74