#define LDAP_MSG_ALL 0x01
#define LDAP_MSG_RECEIVED 0x02
-/*
- * structure for ldap friendly mapping routines
- */
-
-typedef struct ldap_friendly {
- char *lf_unfriendly;
- char *lf_friendly;
-} LDAPFriendlyMap;
-
/*
* types for ldap URL handling
*/
int freemods ));
-/*
- * in friendly.c
- * (deprecated)
- */
-LDAP_F( char * )
-ldap_friendly_name LDAP_P(( /* deprecated */
- LDAP_CONST char *filename,
- LDAP_CONST char *uname,
- LDAPFriendlyMap **map ));
-
-LDAP_F( void )
-ldap_free_friendlymap LDAP_P(( /* deprecated */
- LDAPFriendlyMap **map ));
-
-
/*
* in sort.c
*/
#define FILTERFILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldapfilter.conf"
#define TEMPLATEFILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldaptemplates.conf"
#define SEARCHFILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldapsearchprefs.conf"
-#define FRIENDLYFILE LDAP_DATADIR LDAP_DIRSEP "ldapfriendly"
/*
* FINGER DEFINITIONS
SRCS = bind.c open.c result.c error.c compare.c search.c \
controls.c messages.c references.c extended.c cyrus.c \
modify.c add.c modrdn.c delete.c abandon.c cache.c \
- getfilter.c sasl.c sbind.c kbind.c unbind.c friendly.c \
+ getfilter.c sasl.c sbind.c kbind.c unbind.c \
free.c disptmpl.c srchpref.c dsparse.c tmplout.c sort.c \
getdn.c getentry.c getattr.c getvalues.c addentry.c \
request.c os-ip.c url.c sortctrl.c vlvctrl.c \
OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \
controls.lo messages.lo references.lo extended.lo cyrus.lo \
modify.lo add.lo modrdn.lo delete.lo abandon.lo cache.lo \
- getfilter.lo sasl.lo sbind.lo kbind.lo unbind.lo friendly.lo \
+ getfilter.lo sasl.lo sbind.lo kbind.lo unbind.lo \
free.lo disptmpl.lo srchpref.lo dsparse.lo tmplout.lo sort.lo \
getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo \
request.lo os-ip.lo url.lo sortctrl.lo vlvctrl.lo \
fi; \
$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/$$i.default; \
done
- -$(MKDIR) $(DESTDIR)$(datadir)
- -$(MV) $(DESTDIR)$(datadir)/ldapfriendly $(DESTDIR)$(datadir)/ldapfriendly-
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/ldapfriendly $(DESTDIR)$(datadir)/ldapfriendly
+++ /dev/null
-/* $OpenLDAP$ */
-/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
- */
-/* Portions
- * Copyright (c) 1990 Regents of the University of Michigan.
- * All rights reserved.
- *
- * friendly.c
- */
-
-#include "portable.h"
-
-#include <stdio.h>
-#include <ac/stdlib.h>
-
-#include <ac/errno.h>
-#include <ac/socket.h>
-#include <ac/string.h>
-#include <ac/time.h>
-
-#include "ldap-int.h"
-
-char *
-ldap_friendly_name(
- LDAP_CONST char *filename,
- LDAP_CONST char *uname,
- LDAPFriendlyMap **map )
-{
- int i, entries;
- FILE *fp;
- char *s;
- char buf[BUFSIZ];
-
- if ( map == NULL ) {
- errno = EINVAL;
- return (char *) uname;
- }
-
- if ( *map == NULL ) {
- if ( (fp = fopen( filename, "r" )) == NULL )
- return (char *) uname;
-
- entries = 0;
- while ( fgets( buf, sizeof(buf), fp ) != NULL ) {
- if ( buf[0] != '#' )
- entries++;
- }
- rewind( fp );
-
- if ( (*map = (LDAPFriendlyMap *) LDAP_MALLOC( (entries + 1) *
- sizeof(LDAPFriendlyMap) )) == NULL ) {
- fclose( fp );
- return (char *) uname;
- }
-
- i = 0;
- while ( fgets( buf, sizeof(buf), fp ) != NULL && i < entries ) {
- if ( buf[0] == '#' )
- continue;
-
- if ( (s = strchr( buf, '\n' )) != NULL )
- *s = '\0';
-
- if ( (s = strchr( buf, '\t' )) == NULL )
- continue;
- *s++ = '\0';
-
- if ( *s == '"' ) {
- int esc = 0, found = 0;
-
- for ( ++s; *s && !found; s++ ) {
- switch ( *s ) {
- case '\\':
- esc = 1;
- break;
- case '"':
- if ( !esc )
- found = 1;
- /* FALL */
- default:
- esc = 0;
- break;
- }
- }
- }
-
- (*map)[i].lf_unfriendly = LDAP_STRDUP( buf );
- (*map)[i].lf_friendly = LDAP_STRDUP( s );
- i++;
- }
-
- fclose( fp );
- (*map)[i].lf_unfriendly = NULL;
- }
-
- for ( i = 0; (*map)[i].lf_unfriendly != NULL; i++ ) {
- if ( strcasecmp( uname, (*map)[i].lf_unfriendly ) == 0 )
- return( (*map)[i].lf_friendly );
- }
- return (char *) uname;
-}
-
-
-void
-ldap_free_friendlymap( LDAPFriendlyMap **map )
-{
- LDAPFriendlyMap* pF = *map;
-
- if ( pF == NULL )
- return;
-
- while ( pF->lf_unfriendly )
- {
- LDAP_FREE( pF->lf_unfriendly );
- LDAP_FREE( pF->lf_friendly );
- pF++;
- }
- LDAP_FREE( *map );
- *map = NULL;
-}
+++ /dev/null
-AD Andorra
-AE United Arab Emirates
-AF Afghanistan
-AG Antigua and Barbuda
-AI Anguilla
-AL Albania
-AM Armenia
-AN Netherlands Antilles
-AO Angola
-AQ Antarctica
-AR Argentina
-AS American Samoa
-AT Austria
-AU Australia
-AW Aruba
-AZ Azerbaijan
-BA Bosnia and Herzegowina
-BB Barbados
-BD Bangladesh
-BE Belgium
-BF Burkina Faso
-BG Bulgaria
-BH Bahrain
-BI Burundi
-BJ Benin
-BM Bermuda
-BN Brunei Darussalam
-BO Bolivia
-BR Brazil
-BS Bahamas
-BT Bhutan
-BV Bouvet Island
-BW Botswana
-BY Belarus
-BZ Belize
-CA Canada
-CC Cocos (Keeling) Islands
-CF Central African Republic
-CG Congo
-CH Switzerland
-CI Cote d'Ivoire
-CK Cook Islands
-CL Chile
-CM Cameroon
-CN China
-CO Colombia
-CR Costa Rica
-CS Former Czechoslovakia
-CU Cuba
-CV Cape Verde
-CX Christmas Island
-CY Cyprus
-CZ Czech Republic
-DE Germany
-DJ Djibouti
-DK Denmark
-DM Dominica
-DO Dominican Republic
-DZ Algeria
-EC Ecuador
-EE Estonia
-EG Egypt
-EH Western Sahara
-ER Eritrea
-ES Spain
-ET Ethiopia
-FI Finland
-FJ Fiji
-FK Falkland Islands (Malvinas)
-FM Micronesia
-FO Faroe Islands
-FR France
-FX France, Metropolitan
-GA Gabon
-GB United Kingdom
-GD Grenada
-GE Georgia
-GF French Guiana
-GH Ghana
-GI Gibraltar
-GL Greenland
-GM Gambia
-GN Guinea
-GP Guadeloupe
-GQ Equatorial Guinea
-GR Greece
-GS South Georgia and the South Sandwich Islands
-GT Guatemala
-GU Guam
-GW Guinea-Bissau
-GY Guyana
-HK Hong Kong
-HM Heard and McDonald Islands
-HN Honduras
-HR Croatia
-HT Haiti
-HU Hungary
-ID Indonesia
-IE Ireland
-IL Israel
-IN India
-IO British Indian Ocean Territory
-IQ Iraq
-IR Iran
-IS Iceland
-IT Italy
-JM Jamaica
-JO Jordan
-JP Japan
-KE Kenya
-KG Kyrgyzstan
-KH Cambodia
-KI Kiribati
-KM Comoros
-KN Saint Kitts and Nevis
-KP Korea, Democratic People's Republic of
-KR Korea, Republic of
-KW Kuwait
-KY Cayman Islands
-KZ Kazakhstan
-LA Laos
-LB Lebanon
-LC Saint Lucia
-LI Liechtenstein
-LK Sri Lanka
-LR Liberia
-LS Lesotho
-LT Lithuania
-LU Luxembourg
-LV Latvia
-LY Libya
-MA Morocco
-MC Monaco
-MD Moldova
-MG Madagascar
-MH Marshall Islands
-MK Macedonia
-ML Mali
-MM Myanmar
-MN Mongolia
-MO Macau
-MP Northern Mariana Islands
-MQ Martinique
-MR Mauritania
-MS Montserrat
-MT Malta
-MU Mauritius
-MV Maldives
-MW Malawi
-MX Mexico
-MY Malaysia
-MZ Mozambique
-NA Namibia
-NC New Caledonia
-NE Niger
-NF Norfolk Island
-NG Nigeria
-NI Nicaragua
-NL Netherlands
-NO Norway
-NP Nepal
-NR Nauru
-NU Niue
-NZ New Zealand
-OM Oman
-PA Panama
-PE Peru
-PF French Polynesia
-PG Papua New Guinea
-PH Philippines
-PK Pakistan
-PL Poland
-PM St. Pierre and Miquelon
-PN Pitcairn
-PR Puerto Rico
-PT Portugal
-PW Palau
-PY Paraguay
-QA Qatar
-RE Reunion
-RO Romania
-RU Russian Federation
-RW Rwanda
-SA Saudi Arabia
-SB Solomon Islands
-SC Seychelles
-SD Sudan
-SE Sweden
-SG Singapore
-SH St. Helena
-SI Slovenia
-SJ Svalbard and Jan Mayen Islands
-SK Slovakia (Slovak Republic)
-SL Sierra Leone
-SM San Marino
-SN Senegal
-SO Somalia
-SR Suriname
-ST Sao Tome and Principe
-SU Former Soviet Union
-SV El Salvador
-SY Syria
-SZ Swaziland
-TC Turks and Caicos Islands
-TD Chad
-TF French Southern Territories
-TG Togo
-TH Thailand
-TJ Tajikistan
-TK Tokelau
-TM Turkmenistan
-TN Tunisia
-TO Tonga
-TP East Timor
-TR Turkey
-TT Trinidad and Tobago
-TV Tuvalu
-TW Taiwan
-TZ Tanzania
-UA Ukraine
-UG Uganda
-UK United Kingdom
-UM United States Minor Outlying Islands
-US United States of America
-UY Uruguay
-UZ Uzbekistan
-VA Vatican City State (Holy See)
-VC Saint Vincent and the Grenadines
-VE Venezuela
-VG Virgin Islands (British)
-VI Virgin Islands (U.S.)
-VN Viet Nam
-VU Vanuatu
-WF Wallis and Futuna Islands
-WS Samoa
-YE Yemen
-YT Mayotte
-YU Yugoslavia
-ZA South Africa
-ZM Zambia
-ZR Zaire
-ZW Zimbabwe
XXSRCS = apitest.c test.c tmpltest.c extended.c \
bind.c controls.c open.c result.c error.c compare.c search.c \
modify.c add.c modrdn.c delete.c abandon.c cache.c cyrus.c \
- getfilter.c sasl.c sbind.c kbind.c unbind.c friendly.c \
+ getfilter.c sasl.c sbind.c kbind.c unbind.c \
free.c disptmpl.c srchpref.c dsparse.c tmplout.c sort.c \
getdn.c getentry.c getattr.c getvalues.c addentry.c \
request.c os-ip.c url.c sortctrl.c vlvctrl.c \
extended.lo \
bind.lo controls.lo open.lo result.lo error.lo compare.lo search.lo \
modify.lo add.lo modrdn.lo delete.lo abandon.lo cache.lo cyrus.lo \
- getfilter.lo sasl.lo sbind.lo kbind.lo unbind.lo friendly.lo \
+ getfilter.lo sasl.lo sbind.lo kbind.lo unbind.lo \
free.lo disptmpl.lo srchpref.lo dsparse.lo tmplout.lo sort.lo \
getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo \
request.lo os-ip.lo url.lo sortctrl.lo vlvctrl.lo \