1N/A * The contents of this file are subject to the terms of the 1N/A * Common Development and Distribution License (the "License"). 1N/A * You may not use this file except in compliance with the License. 1N/A * See the License for the specific language governing permissions 1N/A * and limitations under the License. 1N/A * When distributing Covered Code, include this CDDL HEADER in each 1N/A * If applicable, add the following below this CDDL HEADER, with the 1N/A * fields enclosed by brackets "[]" replaced with your own identifying 1N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1N/A * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 1N/A * Debugging routine for printing the value of a result 1N/A printf(
"--------------------------------------\n");
1N/A "attr_pair[%d]->attrvalue[%d] = %s \n",
1N/A printf(
"\n--------------------------------------\n");
1N/A * _get_domain_name() passes the dn one level up from cdn, e.g., 1N/A * a pointer pointing to "ou= ..." for the cdn's listed below: 1N/A * dn: cn=hostname+ipHostNumber="109.34.54.76", ou= ... 1N/A * dn: echo+IpServiceProtocol=udp, ou= ... 1N/A * to __ns_ldap_dn2domain() to retrieve the domain name associated 1N/A /* break the cdn into its components */ 1N/A /* construct parent dn */ /* remove the last ',' */ * "109.34.54.76" -> 109.34.54.76 * and had some DEBUG statemants added. * This function builds a new string, as identified by realfilter, by * replacing the first occurrence of '%s' in userdata with the string * filter provided in the Service Search Descriptor (SSD). * It is used as a call back function by __ns_ldap_list() API. * As an example, lets assume the caller of __ns_ldap_list() is * accessing password information. The userdata filter would previously * have been constructed to contain "(&(%s)(userid=fred))". And the SSD * filter consists of "dept=sds". The new filter would result in * "(&(dept=sds)(userid=fred))". merged =
1;
/* Continue to copy rest of userdata only */ return (
"0123456789abcdef"[n &
0xf]);