2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * Directory lookup functions. These are shims that translate from the API 2N/A * into the RPC protocol. 2N/A * This is the actual implementation of the opaque directory_t structure. 2N/A * Set up a directory search context. 2N/A "Insufficient memory setting up directory access",
NULL);
2N/A * Tear down a directory search context. 2N/A * Does nothing if d==NULL. 2N/A * Given a list of identifiers, a list of their types, and a list of attributes, 2N/A * return the information. 2N/A char errbuf[
100];
/* well long enough for any integer */ 2N/A * Free the results from a directory_get_*() request. 2N/A /* For each directory entry returned */ 2N/A /* For each attribute */ 2N/A * Create a directory datum. Note that we allocate an extra byte and 2N/A * zero it, so that strings get null-terminated. Return NULL on error. 2N/A * Return the size of a directory_datum_t. Note that this does not include 2N/A * the terminating \0, so it represents the value as returned by LDAP. 2N/A * Deduct the terminal \0, so that binary data gets the 2N/A * Unmarshall an RPC directory entry into an API directory entry. 2N/A /* If the entry wasn't found, leave the entry attrs and err NULL. */ 2N/A "Insufficient memory copying directory entry",
NULL));
2N/A * Unmarshall an RPC directory attribute value into the API equivalent. 2N/A * Note that on error some entries may have been copied, and so 2N/A * the caller needs to clean up dav. This is normally not a problem 2N/A * since the caller will have called this function several times and 2N/A * will need to clean up the results from the other calls too. 2N/A /* If it wasn't found, leave the corresponding entry NULL */ 2N/A "Insufficient memory copying directory entry",
NULL));
2N/A "Insufficient memory copying directory entry",
2N/A * Free the results of a directory RPC request.