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] 2N/A * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 1N/A "usage: ldaplist [-dlv] [-h LDAP_server[:serverPort] [-M domainName]\n" 1N/A "[-N profileName] [-a authenticationMethod] [-P certifPath]\n" 1N/A "[-D bindDN] [-w bindPassword] [-j passwdFile]]\n" 1N/A "[<database> [<key>] ...]\n\n" 1N/A "usage: ldaplist -h\n" 1N/A "usage: ldaplist -g\n\n" 1N/A "\t -l list all the attributes found in entry.\n" 1N/A "\t By default, it lists only the DNs.\n" 1N/A "\t -d list attributes for the database instead of its entries\n" 1N/A "\t -v print out the LDAP search filter.\n" 1N/A "\t -g list the database mappings.\n" 1N/A "\t -h An address (or a name) and a port of the LDAP server in\n" 1N/A "\t which the entries will be stored. The default value for\n" 1N/A "\t the port is 389 (or 636 for TLS connections).\n" 1N/A "\t -M The name of a domain served by the specified server.\n" 1N/A "\t If not specified, the default domain name will be used.\n" 1N/A "\t -N Specifies a DUAProfile name.\n" 1N/A "\t The default value is \"default\".\n" 1N/A "\t -a Specifies an authentication method.\n" 1N/A "\t -P The certificate path for the location of the certificate\n" 1N/A "\t -D Specifies an entry which has read permission to\n" 1N/A "\t the requested database.\n" 1N/A "\t -w Password to be used for authenticating the bindDN.\n" 1N/A "\t -j File containing the password for bindDN or SSL key db.\n" 1N/A "\t<database> is the database to be searched in. Standard system\n" 1N/A "\tdatabases are:\n" 1N/A "\t\tpassword, printers, group, hosts, ethers, networks, netmasks,\n" 1N/A "\t\trpc, bootparams, protocols, services, netgroup, auto_*.\n" 1N/A "\tNon-standard system databases can be specified as follows:\n" 1N/A "\t\tby specific container: ou=<dbname> or\n" 1N/A "\t\tby default container: <dbname>. In this case, 'nismapname'\n" 1N/A "\t\twill be used, thus mapping this to nismapname=<dbname>.\n" 1N/A "\t<key> is the key to search in the database. For the standard\n" 1N/A "\tdatabases, the search type for the key is predefined. You can\n" 1N/A "\toverride this by specifying <type>=<key>.\n" 1N/A "\nNOTE: The old -h option printing the mapping information is " 1N/A "deprecated.\nFor backward compatibility the following mode is " 1N/A "available:\nldaplist -h\n"));
1N/A * and had some DEBUG statemants added. 1N/A * This function builds a new string, as identified by realfilter, by 1N/A * replacing the first occurrence of '%s' in userdata with the string 1N/A * filter provided in the Service Search Descriptor (SSD). 1N/A * It is used as a call back function by __ns_ldap_list() API. 1N/A * As an example, lets assume the caller of __ns_ldap_list() is 1N/A * accessing password information. The userdata filter would previously 1N/A * have been constructed to contain "(&(%s)(userid=fred))". And the SSD 1N/A * filter consists of "dept=sds". The new filter would result in 1N/A * "(&(dept=sds)(userid=fred))". 1N/A merged =
1;
/* Continue to copy rest of userdata only */ 1N/A/* returns 0=success, 1=error */ 1N/A /* Binary data should be BASE64 encoded and tagged. */ 1N/A /* preserve backwards compatibility, support old -h option */ 1N/A break;
/* Never reached */ 1N/A "exclusive of -j. -w is ignored.\n"));
1N/A /* Ask for a password later */ 1N/A "exclusive of -j. -w is ignored.\n"));
1N/A "to connect to. \n"));
1N/A /* If password is not specified, then prompt user for it. */ 1N/A * For now we have no use for bindDN and 1N/A "used as an authentication method" 1N/A "The bind DN and password will " 1N/A * If dumpping a database, 1N/A * or all the containers, 1N/A * use page control just 1N/A * in case there are too many entries 1N/A /* build the attribute array */ 1N/A /* build the filter */ 1N/A /* user publickey lookup */ 1N/A /* hosts publickey lookup */ 1N/A /* this should never happen */ 1N/A * we set the search filter to (objectclass=*) when we want 1N/A * to list the directory attribute instead of the entries 1N/A gettext(
"+++ template for merging SSD filter=%s\n"),
2N/A /* LINTED - suppress E_FUNC_HAS_NO_RETURN_STMT (lint bug 7122677) */