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) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * getldaplaliasbyname() retrieves the aliases information from the LDAP server. 2N/A * This is requires that the LDAP naming information (ie. LDAP_CLIENT_CACHE 2N/A * file) is configured properly on the client machine. 2N/A * 1 = alias not found; 2N/A * -1 = other failure. Contents in answer are undefined. 2N/A * This function builds a new string, as identified by realfilter, by 2N/A * replacing the first occurrence of '%s' in userdata with the string 2N/A * filter provided in the Service Search Descriptor (SSD). 2N/A * It is used as a call back function by __ns_ldap_list() API. 2N/A * As an example, lets assume the caller of __ns_ldap_list() is 2N/A * accessing password information. The userdata filter would previously 2N/A * have been constructed to contain "(&(%s)(userid=fred))". And the SSD 2N/A * filter consists of "dept=sds". The new filter would result in 2N/A * "(&(dept=sds)(userid=fred))". 2N/A merged =
1;
/* Continue to copy rest of userdata only */ 2N/A /* get the aliases */ 2N/A /* get the userdata for __ns_ldap_list filter call back */ 2N/A /* should we do hardlookup */ 2N/A /* build the return value */