xref: /titanic_50/usr/src/lib/libnisdb/ldap_glob.h (revision 0e42dee69ed771bf604dd1789fca9d77b5bbe302)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 #ifndef	_LDAP_GLOB_H
30 #define	_LDAP_GLOB_H
31 
32 #include <stdio.h>
33 #include <rpcsvc/nis.h>
34 
35 #ifdef	__cplusplus
36 extern "C" {
37 #endif
38 
39 /*
40  * The following may be defined and set by the application. If not,
41  * we'll use local equivalents that disable the feature.
42  */
43 extern int	verbose;
44 extern int	justTesting;
45 extern FILE	*cons;
46 extern int	setColumnsDuringConfig;
47 
48 /*
49  * Functions that reside in rpc.nisd. We provide local do-nothing-return-
50  * failure incarnations that are there strictly to prevent a link error.
51  * If libnisdb calls one of these, we had better be running inside rpc.nisd.
52  */
53 extern int		update_root_object(nis_name root_dir,
54 				nis_object *d_obj);
55 extern nis_object	*get_root_object(void);
56 extern int		remove_root_object(nis_name root_dir,
57 				nis_object* d_obj);
58 extern int		beginTransaction(void);
59 extern int		abort_transaction(int xid);
60 extern int		endTransaction(int xid, nis_object *dirObj);
61 extern int		addUpdate(log_entry_t type, char *name,
62 				int numAttr, nis_attr *attr, nis_object *obj,
63 				nis_object *oldDir, uint32_t ttime);
64 extern int		lockTransLog(char *msg, int wr, int trylock);
65 extern void		unlockTransLog(char *msg, int wr);
66 extern int		__nis_lock_db_table(nis_name name, int readwrite,
67 						int *trylock, char *msg);
68 extern int		__nis_ulock_db_table(nis_name name, int readwrite,
69 						int remove, char *msg);
70 
71 #ifdef	__cplusplus
72 }
73 #endif	/* __cplusplus */
74 
75 #endif	/* _LDAP_GLOB_H */
76