/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include "ldap_scheme.h"
#include "ldap_util.h"
#include "ldap_nisdbquery.h"
/*
* Input: A db_query where the 'which_index' fields refer to the schema
* columns.
* Output: A db_query where the 'which_index' fields refer to the table
* columns.
*/
db_query *
db_query *q;
int i;
q = cloneQuery(qin, 0);
if (q == 0 || s == 0)
return (q);
for (i = 0; i < q->components.components_len; i++) {
"%s: query index %d out-of-range (%d)",
freeQuery(q);
return (0);
}
}
return (q);
}
/*
* Input: A db_query where the 'which_index' fields refer to the scheme
* columns, space for a nis_attr array with at least q->components->
* components_len elements, a scheme, and a __nis_table_mapping_t
* (for column names).
* Output: A nis_attr structure with the searchable columns.
*/
nis_attr *
__nis_table_mapping_t *t, int *numAttr) {
nis_attr *a;
char **col;
return (0);
/*
* A table will have the column names stored in the mapping
* structure, while a directory only has a single column
* called "name". The latter isn't stored in the mapping,
* so we create a column name array for a directory.
*/
if (t->numColumns > 0) {
nc = t->numColumns;
} else {
if (t->objType == NIS_DIRECTORY_OBJ) {
nc = 1;
} else {
return (0);
}
}
a = space;
int index;
"%s: query index %d out-of-range (%d)",
return (0);
}
"%s: column index out-of-range (%d >= %d)",
return (0);
}
na++;
}
return (a);
}