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 (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 2N/A * Some helper routines for directory lookup. These offer functions that 2N/A * you could implement yourself on top of the generic routines, but since 2N/A * they're a common request we implement them here. (Well, OK, we cheat a bit 2N/A * and call an internal routine to do the dirty work to reduce code 2N/A * duplication, but you could still implement them using the generic routines.) 2N/A * Given a username, return a text-form SID. 2N/A * The SID must be free()ed by the caller. 2N/A * d, if non-NULL, specifies an existing directory-search context. 2N/A * If NULL, a temporary one will be created. 2N/A /* Prep for error cases. */ 2N/A "Insufficient memory retrieving data about SID",
NULL);
2N/A * Given a name or text-format SID, return a user@domain. 2N/A * The user@domain returned must be free()ed by the caller. 2N/A * Returns NULL and sets *name to NULL if no error occurred but the specified 2N/A * entity does not exist. 2N/A * d, if non-NULL, specifies an existing directory-search context. 2N/A * If NULL, a temporary one will be created. 2N/A * Attributes required to generate a canonical name, in named-list and 2N/A "x-sun-canonicalName",
2N/A /* Prep for error cases. */ 2N/A "Insufficient memory retrieving data about name",
NULL);