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