4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
30 #include <rpcsvc/nis.h>
32 #include "ldap_parse.h"
33 #include "ldap_structs.h"
34 #include "nis_hashitem.h"
35 #include "db_query_c.h"
41 extern __nis_hash_table_mt ldapMappingList
;
51 /* Exported functions */
52 db_query
**mapFromLDAP(__nis_table_mapping_t
*t
, db_query
*qin
,
53 int *numQueries
, char *dbId
, int *ldapStat
,
54 __nis_obj_attr_t
***objAttr
);
55 int mapToLDAP(__nis_table_mapping_t
*t
, int numQueries
,
56 db_query
**oldQ
, db_query
**newQ
,
57 __nis_rule_value_t
*rvIn
, int firstOnly
,
59 int verifyIndexMatch(__nis_table_mapping_t
*x
,
60 db_query
*q
, __nis_rule_value_t
*rv
,
61 char *name
, char *val
);
62 __nis_table_mapping_t
**selectTableMapping(__nis_table_mapping_t
*t
,
63 db_query
*q
, int wantWrite
, int wantObj
,
64 char *dbId
, int *numMatches
);
65 int haveIndexedMapping(__nis_table_mapping_t
*t
);
66 int objToLDAP(__nis_table_mapping_t
*t
, nis_object
*o
,
67 entry_obj
**ea
, int numEa
);
68 int objFromLDAP(__nis_table_mapping_t
*t
, nis_object
**o
,
69 entry_obj
***eaP
, int *numEaP
);
70 int deleteLDAPobj(__nis_table_mapping_t
*t
);
71 __nis_obj_attr_t
*ruleValue2ObjAttr(__nis_rule_value_t
*rv
);
72 void freeSingleObjAttr(__nis_obj_attr_t
*attr
);
73 void freeObjAttr(__nis_obj_attr_t
**attr
, int numAttr
);
74 __nis_obj_attr_t
*cloneObjAttr(__nis_obj_attr_t
*old
);
75 int isObjAttrString(char *str
);
76 char *isObjAttr(__nis_single_value_t
*val
);
77 int setObjAttrField(char *attrName
,
78 __nis_single_value_t
*val
,
79 __nis_obj_attr_t
**objAttr
);
80 int setColumnNames(__nis_table_mapping_t
*t
);
81 __nis_rule_value_t
*addObjAttr2RuleValue(nis_object
*obj
,
82 __nis_rule_value_t
*rvIn
);
88 #endif /* _LDAP_MAP_H */