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 2006 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A/* networks attributes filters */ 2N/A "(ipNetworkNumber=%s)))" 2N/A "(ipNetworkNumber=%s)))" 2N/A * _nss_ldap_networks2str is the data marshaling method for the networks 2N/A * getXbyY * (e.g., getbyname(), getbyaddr(), getnetent() backend processes. 2N/A * This method is called after a successful ldap search has been performed. 2N/A * This method will parse the ldap search values into the file format. 2N/A * SunRay-ce2 10.34.96.0 SunRay 2N/A /* Get the canonical name */ 2N/A * The definition of the object class "ipNetwork" has a 2N/A * discrepency between RFC 2307 and 2307bis. 2N/A * In 2307, "cn" is a MUST attribute. In 2307bis, "cn" is a 2N/A * If "cn" is a MAY attribute, it does not appear in RDN and can't 2N/A * be derived from RDN as a canonical "cn" name. In that case, use 1st 2N/A * "cn" value as the official name. 2N/A /* Append aliases */ 2N/A /* Skip the canonical name */ 2N/A /* The front end marshaller doesn't need to copy trailing nulls */ 2N/A * Takes an unsigned integer in host order, and returns a printable 2N/A * string for it as a network number. To allow for the possibility of 2N/A * naming subnets, only trailing dot-zeros are truncated. 2N/A * buf2 is untruncated version. 2N/A * getbyname gets a network entry by name. This function constructs an 2N/A * ldap search filter using the network name invocation parameter and the 2N/A * getnetbyname search filter defined. Once the filter is constructed, we 2N/A * search for a matching entry and marshal the data results into struct 2N/A * netent for the frontend process. The function _nss_ldap_networks2ent 2N/A * performs the data marshaling. 2N/A * getbyaddr gets a network entry by ip address. This function constructs an 2N/A * ldap search filter using the name invocation parameter and the getnetbyaddr 2N/A * search filter defined. Once the filter is constructed, we search for a 2N/A * matching entry and marshal the data results into struct netent for the 2N/A * frontend process. The function _nss_ldap_networks2ent performs the data 2N/A * _nss_ldap_networks_constr is where life begins. This function calls the 2N/A * generic ldap constructor function to define and build the abstract data 2N/A * types required to support ldap operations.