xref: /titanic_50/usr/src/lib/libnisdb/ldap_glob.c (revision 275c9da86e89f8abf71135cf63d9fc23671b2e60)
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 #include "ldap_glob.h"
30 
31 /* These are the local versions we use if the app doesn't provide overrides */
32 int		verbose = 0;
33 int		justTesting = 0;
34 FILE		*cons = 0;
35 int		setColumnsDuringConfig = 0;
36 
37 int
38 __local_update_root_object(nis_name root_dir, nis_object *d_obj) {
39 	return (0);
40 }
41 
42 nis_object *
43 __local_get_root_object(void) {
44 	return (0);
45 }
46 
47 int
48 __local_remove_root_object(nis_name root_dir, nis_object* d_obj) {
49 	return (0);
50 }
51 
52 int
53 __local_beginTransaction(void) {
54 	return (1);
55 }
56 
57 int
58 __local_abort_transaction(int xid) {
59 	return (0);
60 }
61 
62 int
63 __local_endTransaction(int xid, nis_object *dirObj) {
64 	return (0);
65 }
66 
67 int
68 __local_addUpdate(log_entry_t type, char *name, int numAttr, nis_attr *attr,
69 		nis_object *obj, nis_object *oldDir, uint32_t ttime) {
70 	return (-1);
71 }
72 
73 int
74 __local_lockTransLog(char *msg, int wr, int trylock) {
75 	return (0);
76 }
77 
78 void
79 __local_unlockTransLog(char *msg, int wr) {
80 }
81 
82 int
83 __local__nis_lock_db_table(nis_name name, int readwrite, int *trylock,
84 				char *msg) {
85 	return (1);
86 }
87 
88 int
89 __local__nis_ulock_db_table(nis_name name, int readwrite, int remove,
90 				char *msg) {
91 	return (1);
92 }
93 
94 /* Weak symbol linkage allows override; default is local versions */
95 #pragma weak	verbose
96 #pragma weak	justTesting
97 #pragma weak	cons
98 #pragma weak	setColumnsDuringConfig
99 #pragma weak	update_root_object = __local_update_root_object
100 #pragma weak	get_root_object = __local_get_root_object
101 #pragma weak	remove_root_object = __local_remove_root_object
102 #pragma weak	beginTransaction = __local_beginTransaction
103 #pragma weak	abort_transaction = __local_abort_transaction
104 #pragma weak	endTransaction = __local_endTransaction
105 #pragma weak	addUpdate = __local_addUpdate
106 #pragma weak	lockTransLog = __local_lockTransLog
107 #pragma weak	unlockTransLog = __local_unlockTransLog
108 #pragma weak	__nis_lock_db_table = __local__nis_lock_db_table
109 #pragma weak	__nis_ulock_db_table = __local__nis_ulock_db_table
110