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/* passwd attributes filters */ 2N/A/* Use this attribute to ask for server type from libsldap. */ 2N/A "__ns_ldap_op_attr_server_type",
2N/A * dn2uid_cache_state is set in getgrent.c when group dn2uid cache is created. 2N/A * _nss_ldap_passwd2str is the data marshaling method for the passwd getXbyY 2N/A * (e.g., getbyuid(), getbyname(), getpwent()) backend processes. This method is 2N/A * called after a successful ldap search has been performed. This method will 2N/A * parse the ldap search values into the file format. 2N/A * nobody:x:60001:60001:Nobody:/: 2N/A /* 8 = 6 ':' + 1 '\0' + 1 'x' */ 2N/A /* Validate UID and GID */ 2N/A "%s:%s:%s:%s:%s:%s:%s",
2N/A * Save the entry DN as an optional data, if 2N/A * dn to uid caching is being performed and 2N/A * not processing enumeration results and 2N/A * there's enough room in the buffer. 2N/A * Format is (passwd data followed by the optional data): 2N/A * <passwd data> + '\0' + '#dn:' + <server_type>' + ':' + 2N/A "%s:%s:%s:%s:%s:%s:%s",
2N/A "%s:%s:%s:%s:%s:%s:%s%c%s%s:%s",
2N/A * getbyname gets a passwd entry by uid name. This function constructs an ldap 2N/A * search filter using the name invocation parameter and the getpwnam search 2N/A * filter defined. Once the filter is constructed, we search for a matching 2N/A * entry and marshal the data results into struct passwd for the frontend 2N/A * process. The function _nss_ldap_passwd2ent performs the data marshaling. 2N/A * getbyuid gets a passwd entry by uid number. This function constructs an ldap 2N/A * search filter using the uid invocation parameter and the getpwuid search 2N/A * filter defined. Once the filter is constructed, we search for a matching 2N/A * entry and marshal the data results into struct passwd for the frontend 2N/A * process. The function _nss_ldap_passwd2ent performs the data marshaling. 2N/A * _nss_ldap_passwd_constr is where life begins. This function calls the 2N/A * generic ldap constructor function to define and build the abstract 2N/A * data types required to support ldap operations.