Update copyright of build environment, includes, and liblber/libldap.

This commit is contained in:
Kurt Zeilenga 1998-12-31 20:32:03 +00:00
parent 0ecb80a6bf
commit 14741c26d9
104 changed files with 1272 additions and 693 deletions

View File

@ -1,4 +1,4 @@
Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA
Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
All rights reserved.
Redistribution and use in source and binary forms are permitted only

View File

@ -1,6 +1,13 @@
# Master Makefile for OpenLDAP
# Copyright 1998 The OpenLDAP Foundation, All Rights Reserved.
# COPYING RESTRICTIONS APPLY, See COPYRIGHT file
##
## Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
## All rights reserved.
##
## Redistribution and use in source and binary forms are permitted only
## as authorized by the OpenLDAP Public License. A copy of this
## license is available at http://www.OpenLDAP.org/license.html or
## in file LICENSE in the top-level directory of the distribution.
##
SUBDIRS= include libraries clients servers # contrib
CLEANDIRS= tests doc

View File

@ -1,4 +1,7 @@
/* acconfig.h
Copyright 1998 The OpenLDAP Foundation, All Rights Reserved.
COPYING RESTRICTIONS APPLY, See COPYRIGHT file
Descriptive text for the C preprocessor macros that
the distributed Autoconf macros can define.

View File

@ -1,3 +1,5 @@
dnl Copyright 1998 The OpenLDAP Foundation, All Rights Reserved.
dnl COPYING RESTRICTIONS APPLY, See COPYRIGHT file
dnl
dnl OpenLDAP Autoconf Macros
dnl

2
aclocal.m4 vendored
View File

@ -10,6 +10,8 @@ dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
dnl Copyright 1998 The OpenLDAP Foundation, All Rights Reserved.
dnl COPYING RESTRICTIONS APPLY, See COPYRIGHT file
dnl
dnl OpenLDAP Autoconf Macros
dnl

View File

@ -1,3 +1,6 @@
## Copyright 1998,1999 The OpenLDAP Foundation
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
## of this package for details.
##---------------------------------------------------------------------------
##
## Makes subdirectories

9
build/info.mk Normal file
View File

@ -0,0 +1,9 @@
## Copyright 1998,1999 The OpenLDAP Foundation
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
## of this package for details.
##---------------------------------------------------------------------------
##
## Makefile Template for Non-Source Directories
##
Makefile: $(top_srcdir)/build/info.mk

View File

@ -1,3 +1,6 @@
## Copyright 1998,1999 The OpenLDAP Foundation
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
## of this package for details.
##---------------------------------------------------------------------------
##
## Makefile Template for Shared Libraries

View File

@ -1,3 +1,6 @@
## Copyright 1998,1999 The OpenLDAP Foundation
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
## of this package for details.
##---------------------------------------------------------------------------
##
## Makefile Template for Static Libraries

View File

@ -1,3 +1,6 @@
## Copyright 1998,1999 The OpenLDAP Foundation
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
## of this package for details.
##---------------------------------------------------------------------------
##
## Makefile Template for Libraries

View File

@ -1,3 +1,6 @@
## Copyright 1998,1999 The OpenLDAP Foundation
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
## of this package for details.
##---------------------------------------------------------------------------
##
## Makefile Template for Manual Pages

View File

@ -1,3 +1,5 @@
dnl Copyright 1998 The OpenLDAP Foundation, All Rights Reserved.
dnl COPYING RESTRICTIONS APPLY, See COPYRIGHT file
dnl
dnl OpenLDAP Autoconf Macros
dnl

View File

@ -1,3 +1,6 @@
## Copyright 1998,1999 The OpenLDAP Foundation
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
## of this package for details.
##---------------------------------------------------------------------------
##
## Makefile Template for Programs

View File

@ -1,3 +1,6 @@
## Copyright 1998,1999 The OpenLDAP Foundation
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
## of this package for details.
##---------------------------------------------------------------------------
##
## Makefile Template for Servers

View File

@ -1,7 +1,11 @@
##
## Copyright 1998 The OpenLDAP Foundation
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
## of this package for details.
## Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
## All rights reserved.
##
## Redistribution and use in source and binary forms are permitted only
## as authorized by the OpenLDAP Public License. A copy of this
## license is available at http://www.OpenLDAP.org/license.html or
## in file LICENSE in the top-level directory of the distribution.
##
PACKAGE= @PACKAGE@
VERSION= @VERSION@

View File

@ -1,10 +1,11 @@
dnl Copyright 1998 The OpenLDAP Foundation. All Rights Reserved.
dnl
dnl Copyright 1998,1999 The OpenLDAP Foundation. All Rights Reserved.
dnl
dnl Redistribution and use in source and binary forms are permitted only
dnl as authorized by the OpenLDAP Public License. A copy of this
dnl license is available at http://www.OpenLDAP.org/license.html or
dnl in file LICENSE in the top-level directory of the distribution.
dnl ----
dnl
dnl Configure.in for OpenLDAP
AC_INIT(include/ldap.h)dnl

33
include/ac/alloca.h Normal file
View File

@ -0,0 +1,33 @@
/* Generic alloca.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_ALLOCA_H
#define _AC_ALLOCA_H
/* AIX requires this to be the first thing in the file. */
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
#endif /* _AC_ALLOCA_H */

View File

@ -1,4 +1,13 @@
/* Generic bytes.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_BYTES_H
#define _AC_BYTES_H

25
include/ac/ctype.h Normal file
View File

@ -0,0 +1,25 @@
/* Generic ctype.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_CTYPE_H
#define _AC_CTYPE_H
#include <ctype.h>
#ifdef C_UPPER_LOWER
# define TOUPPER(c) (islower(c) ? toupper(c) : (c))
# define TOLOWER(c) (islower(c) ? toupper(c) : (c))
#else
# define TOUPPER(c) toupper(c)
# define TOLOWER(c) tolower(c)
#endif
#endif /* _AC_CTYPE_H */

32
include/ac/dirent.h Normal file
View File

@ -0,0 +1,32 @@
/* Generic dirent.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_DIRENT_H
#define _AC_DIRENT_H
#if HAVE_DIRENT_H
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# if HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
# if HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif
# if HAVE_NDIR_H
# include <ndir.h>
# endif
#endif
#endif /* _AC_DIRENT_H */

28
include/ac/errno.h Normal file
View File

@ -0,0 +1,28 @@
/* Generic errno.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_ERRNO_H
#define _AC_ERRNO_H
#if defined( HAVE_ERRNO_H )
# include <errno.h>
#elif defined( HAVE_SYS_ERRNO_H )
# include <sys/errno.h>
#endif
#ifdef DECL_SYS_ERRLIST
extern int sys_nerr;
extern char *sys_errlist[];
#endif
/* use _POSIX_VERSION for POSIX.1 code */
#endif /* _AC_ERRNO_H */

30
include/ac/krb.h Normal file
View File

@ -0,0 +1,30 @@
/* Generic krb.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_KRB_H
#define _AC_KRB_H
#if defined( HAVE_KERBEROS )
#if defined( HAVE_KERBEROSIV_KRB_H )
#include <kerberosIV/krb.h>
#elif defined( HAVE_KRB_H )
#include <krb.h>
#endif
#if defined( HAVE_KERBEROSIV_DES_H )
#include <kerberosIV/des.h>
#elif defined( HAVE_DES_H )
#include <des.h>
#endif
#endif /* HAVE_KERBEROS */
#endif /* _AC_KRB_H */

32
include/ac/regex.h Normal file
View File

@ -0,0 +1,32 @@
/*
* Generic Regex
*/
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_REGEX_H_
#define _AC_REGEX_H_
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifndef HAVE_REGEX_H
/* NO POSIX REGEX!!
you'll need to install a POSIX compatible REGEX library.
Either Henry Spencer's or GNU regex will do.
For NT: http://people.delphi.com/gjc/hs_regex.html
*/
#else
/* have regex.h, assume it's POSIX compliant */
# include <regex.h>
#endif /* regex.h */
#endif /* _AC_REGEX_H_ */

View File

@ -1,4 +1,13 @@
/* Generic setproctitle.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_SETPROCTITLE_H
#define _AC_SETPROCTITLE_H

View File

@ -1,4 +1,13 @@
/* Generic signal.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_SIGNAL_H
#define _AC_SIGNAL_H

View File

@ -1,6 +1,15 @@
/*
* Generic socket.h
*/
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_SOCKET_H_
#define _AC_SOCKET_H_

View File

@ -1,4 +1,13 @@
/* Generic stdarg.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_STDARG_H
#define _AC_STDARG_H 1

View File

@ -1,4 +1,13 @@
/* Generic string.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_STRING_H
#define _AC_STRING_H

32
include/ac/syslog.h Normal file
View File

@ -0,0 +1,32 @@
/*
* Generic syslog.h
*/
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_SYSLOG_H_
#define _AC_SYSLOG_H_
#if defined( HAVE_SYSLOG_H )
#include <syslog.h>
#elif defined ( HAVE_SYS_SYSLOG_H )
#include <sys/syslog.h>
#endif
#if defined( LOG_NDELAY ) && defined( LOG_NOWAIT )
# define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY | LOG_NOWAIT )
#elif defined( LOG_NDELAY )
# define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY )
#elif defined( LOG_NOWAIT )
# define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT )
#else
# define OPENLOG_OPTIONS ( LOG_PID )
#endif
#endif /* _AC_SYSLOG_H_ */

View File

@ -1,4 +1,13 @@
/* Generic termios.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_TERMIOS_H
#define _AC_TERMIOS_H

24
include/ac/time.h Normal file
View File

@ -0,0 +1,24 @@
/* Generic time.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_TIME_H
#define _AC_TIME_H
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#elif HAVE_SYS_TIME_H
# include <sys/time.h>
#else
# include <time.h>
#endif
#endif /* _AC_TIME_H */

View File

@ -1,4 +1,13 @@
/* Generic unistd.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_UNISTD_H
#define _AC_UNISTD_H

34
include/ac/wait.h Normal file
View File

@ -0,0 +1,34 @@
/* Generic wait.h */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _AC_WAIT_H
#define _AC_WAIT_H
#include <sys/types.h>
#if HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
#ifndef WEXITSTATUS
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif
#ifdef WCONTINUED
# define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED )
#else
# define WAIT_FLAGS ( WNOHANG | WUNTRACED )
#endif
#endif /* _AC_WAIT_H */

View File

@ -1,5 +1,13 @@
/* avl.h - avl tree definitions */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* Portions
* Copyright (c) 1993 Regents of the University of Michigan.
* All rights reserved.
*
@ -10,6 +18,7 @@
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*/
/* avl.h - avl tree definitions */
#ifndef _AVL

View File

@ -1,4 +1,13 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* Portions
* Copyright (c) 1993, 1994 Regents of the University of Michigan.
* All rights reserved.
*
@ -16,10 +25,9 @@
#ifndef _DISPTMPL_H
#define _DISPTMPL_H
#ifdef __cplusplus
extern "C" {
#endif
#include <ldap_cdefs.h>
LDAP_BEGIN_DECL
#define LDAP_TEMPLATE_VERSION 1
@ -126,13 +134,13 @@ struct ldap_tmplitem {
#define NULLTMPLITEM ((struct ldap_tmplitem *)0)
#define LDAP_SET_TMPLITEM_APPDATA( ti, datap ) \
(ti)->ti_appdata = (void *)(datap)
( (ti)->ti_appdata = (void *)(datap) )
#define LDAP_GET_TMPLITEM_APPDATA( ti, type ) \
(type)((ti)->ti_appdata)
( (type)((ti)->ti_appdata) )
#define LDAP_IS_TMPLITEM_OPTION_SET( ti, option ) \
(((ti)->ti_options & option ) != 0 )
( ((ti)->ti_options & (option) ) != 0 )
/*
@ -202,13 +210,13 @@ struct ldap_disptmpl {
#define NULLDISPTMPL ((struct ldap_disptmpl *)0)
#define LDAP_SET_DISPTMPL_APPDATA( dt, datap ) \
(dt)->dt_appdata = (void *)(datap)
( (dt)->dt_appdata = (void *)(datap) )
#define LDAP_GET_DISPTMPL_APPDATA( dt, type ) \
(type)((dt)->dt_appdata)
( (type)((dt)->dt_appdata) )
#define LDAP_IS_DISPTMPL_OPTION_SET( dt, option ) \
(((dt)->dt_options & option ) != 0 )
( ((dt)->dt_options & (option) ) != 0 )
#define LDAP_TMPL_ERR_VERSION 1
#define LDAP_TMPL_ERR_MEM 2
@ -221,110 +229,95 @@ struct ldap_disptmpl {
#define LDAP_DTMPL_BUFSIZ 8192
#ifndef NEEDPROTOS
typedef int (*writeptype) LDAP_P(( void *writeparm, char *p, int len ));
typedef int (*writeptype)();
LDAP_F int
ldap_init_templates LDAP_P(( char *file, struct ldap_disptmpl **tmpllistp ));
int ldap_init_templates();
int ldap_init_templates_buf();
void ldap_free_templates();
struct ldap_disptmpl *ldap_first_disptmpl();
struct ldap_disptmpl *ldap_next_disptmpl();
struct ldap_disptmpl *ldap_name2template();
struct ldap_disptmpl *ldap_oc2template();
char **ldap_tmplattrs();
struct ldap_tmplitem *ldap_first_tmplrow();
struct ldap_tmplitem *ldap_next_tmplrow();
struct ldap_tmplitem *ldap_first_tmplcol();
struct ldap_tmplitem *ldap_next_tmplcol();
int ldap_entry2text_search();
int ldap_entry2text();
int ldap_vals2text();
int ldap_entry2html_search();
int ldap_entry2html();
int ldap_vals2html();
LDAP_F int
ldap_init_templates_buf LDAP_P(( char *buf,
long buflen,
struct ldap_disptmpl **tmpllistp ));
#else /* !NEEDPROTOS */
LDAP_F void
ldap_free_templates LDAP_P(( struct ldap_disptmpl *tmpllist ));
typedef int (*writeptype)( void *writeparm, char *p, int len );
LDAP_F struct ldap_disptmpl *
ldap_first_disptmpl LDAP_P(( struct ldap_disptmpl *tmpllist ));
LDAPFUNCDECL int
ldap_init_templates( char *file, struct ldap_disptmpl **tmpllistp );
LDAP_F struct ldap_disptmpl *
ldap_next_disptmpl LDAP_P(( struct ldap_disptmpl *tmpllist,
struct ldap_disptmpl *tmpl ));
LDAPFUNCDECL int
ldap_init_templates_buf( char *buf, long buflen,
struct ldap_disptmpl **tmpllistp );
LDAP_F struct ldap_disptmpl *
ldap_name2template LDAP_P(( char *name,
struct ldap_disptmpl *tmpllist ));
LDAPFUNCDECL void
ldap_free_templates( struct ldap_disptmpl *tmpllist );
LDAP_F struct ldap_disptmpl *
ldap_oc2template LDAP_P(( char **oclist,
struct ldap_disptmpl *tmpllist ));
LDAPFUNCDECL struct ldap_disptmpl *
ldap_first_disptmpl( struct ldap_disptmpl *tmpllist );
LDAP_F char **
ldap_tmplattrs LDAP_P(( struct ldap_disptmpl *tmpl,
char **includeattrs,
int exclude,
unsigned long syntaxmask ));
LDAPFUNCDECL struct ldap_disptmpl *
ldap_next_disptmpl( struct ldap_disptmpl *tmpllist,
struct ldap_disptmpl *tmpl );
LDAP_F struct ldap_tmplitem *
ldap_first_tmplrow LDAP_P(( struct ldap_disptmpl *tmpl ));
LDAPFUNCDECL struct ldap_disptmpl *
ldap_name2template( char *name, struct ldap_disptmpl *tmpllist );
LDAP_F struct ldap_tmplitem *
ldap_next_tmplrow LDAP_P(( struct ldap_disptmpl *tmpl,
struct ldap_tmplitem *row ));
LDAPFUNCDECL struct ldap_disptmpl *
ldap_oc2template( char **oclist, struct ldap_disptmpl *tmpllist );
LDAP_F struct ldap_tmplitem *
ldap_first_tmplcol LDAP_P(( struct ldap_disptmpl *tmpl,
struct ldap_tmplitem *row ));
LDAPFUNCDECL char **
ldap_tmplattrs( struct ldap_disptmpl *tmpl, char **includeattrs, int exclude,
unsigned long syntaxmask );
LDAP_F struct ldap_tmplitem *
ldap_next_tmplcol LDAP_P(( struct ldap_disptmpl *tmpl,
struct ldap_tmplitem *row,
struct ldap_tmplitem *col ));
LDAPFUNCDECL struct ldap_tmplitem *
ldap_first_tmplrow( struct ldap_disptmpl *tmpl );
LDAPFUNCDECL struct ldap_tmplitem *
ldap_next_tmplrow( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row );
LDAPFUNCDECL struct ldap_tmplitem *
ldap_first_tmplcol( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row );
LDAPFUNCDECL struct ldap_tmplitem *
ldap_next_tmplcol( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row,
struct ldap_tmplitem *col );
LDAPFUNCDECL int
ldap_entry2text( LDAP *ld, char *buf, LDAPMessage *entry,
LDAP_F int
ldap_entry2text LDAP_P(( LDAP *ld,
char *buf, LDAPMessage *entry,
struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
writeptype writeproc, void *writeparm, char *eol, int rdncount,
unsigned long opts );
unsigned long opts ));
LDAPFUNCDECL int
ldap_vals2text( LDAP *ld, char *buf, char **vals, char *label, int labelwidth,
LDAP_F int
ldap_vals2text LDAP_P(( LDAP *ld,
char *buf, char **vals, char *label, int labelwidth,
unsigned long syntaxid, writeptype writeproc, void *writeparm,
char *eol, int rdncount );
char *eol, int rdncount ));
LDAPFUNCDECL int
ldap_entry2text_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry,
LDAP_F int
ldap_entry2text_search LDAP_P(( LDAP *ld,
char *dn, char *base, LDAPMessage *entry,
struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals,
writeptype writeproc, void *writeparm, char *eol, int rdncount,
unsigned long opts );
unsigned long opts ));
LDAPFUNCDECL int
ldap_entry2html( LDAP *ld, char *buf, LDAPMessage *entry,
LDAP_F int
ldap_entry2html LDAP_P(( LDAP *ld,
char *buf, LDAPMessage *entry,
struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
writeptype writeproc, void *writeparm, char *eol, int rdncount,
unsigned long opts, char *urlprefix, char *base );
unsigned long opts, char *urlprefix, char *base ));
LDAPFUNCDECL int
ldap_vals2html( LDAP *ld, char *buf, char **vals, char *label, int labelwidth,
LDAP_F int
ldap_vals2html LDAP_P(( LDAP *ld,
char *buf, char **vals, char *label, int labelwidth,
unsigned long syntaxid, writeptype writeproc, void *writeparm,
char *eol, int rdncount, char *urlprefix );
char *eol, int rdncount, char *urlprefix ));
LDAPFUNCDECL int
ldap_entry2html_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry,
LDAP_F int
ldap_entry2html_search LDAP_P(( LDAP
*ld, char *dn, char *base, LDAPMessage *entry,
struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals,
writeptype writeproc, void *writeparm, char *eol, int rdncount,
unsigned long opts, char *urlprefix );
#endif /* !NEEDPROTOS */
unsigned long opts, char *urlprefix ));
#ifdef __cplusplus
}
#endif
LDAP_END_DECL
#endif /* _DISPTMPL_H */

23
include/getopt-compat.h Normal file
View File

@ -0,0 +1,23 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/*
* getopt(3) declarations
*/
#ifndef _GETOPT_COMPAT_H
#define _GETOPT_COMPAT_H
#include <ldap_cdefs.h>
extern char *optarg;
extern int optind, opterr, optopt;
LDAP_F int getopt LDAP_P((int, char * const [], const char *));
#endif /* _GETOPT_COMPAT_H */

View File

@ -1,4 +1,13 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* Portions
* Copyright (c) 1990 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,4 +1,13 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* Portions
* Copyright (c) 1990 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,3 +1,12 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* LDAP C Defines */
#ifndef _LDAP_CDEFS_H

View File

@ -1,4 +1,13 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* Portions
* Copyright (c) 1994 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,4 +1,13 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* Portions
* Copyright (c) 1994 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,9 +1,123 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* ldbm.h - ldap dbm compatibility routine header file */
#ifndef _LDBM_H_
#define _LDBM_H_
#ifdef LDBM_USE_GDBM
#ifdef LDBM_USE_DBBTREE
/*****************************************************************
* *
* use berkeley db btree package *
* *
*****************************************************************/
#include <sys/types.h>
#include <limits.h>
#include <fcntl.h>
#ifdef HAVE_DB185_H
# include <db_185.h>
#else
# include <db.h>
# ifdef HAVE_BERKELEY_DB2
# define R_NOOVERWRITE DB_NOOVERWRITE
# define DEFAULT_DB_PAGE_SIZE 1024
# endif
#endif
typedef DBT Datum;
#define dsize size
#define dptr data
typedef DB *LDBM;
#define DB_TYPE DB_BTREE
/* for ldbm_open */
#ifdef HAVE_BERKELEY_DB2
# define LDBM_READER DB_RDONLY
# define LDBM_WRITER 0x00000 /* hopefully */
# define LDBM_WRCREAT (DB_NOMMAP|DB_CREATE|DB_THREAD)
# define LDBM_NEWDB (DB_TRUNCATE|DB_CREATE|DB_THREAD)
#else
# define LDBM_READER O_RDONLY
# define LDBM_WRITER O_RDWR
# define LDBM_WRCREAT (O_RDWR|O_CREAT)
# define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT)
#endif
# define LDBM_FAST 0
#define LDBM_SUFFIX ".dbb"
#define LDBM_ORDERED 1
/* for ldbm_insert */
#define LDBM_INSERT R_NOOVERWRITE
#define LDBM_REPLACE 0
#define LDBM_SYNC 0x80000000
#elif defined( LDBM_USE_DBHASH )
/*****************************************************************
* *
* use berkeley db hash package *
* *
*****************************************************************/
#include <sys/types.h>
#include <limits.h>
#include <fcntl.h>
#ifdef HAVE_DB185_H
# include <db_185.h>
#else
# include <db.h>
# ifdef LDBM_USE_DB2
# define R_NOOVERWRITE DB_NOOVERWRITE
# define DEFAULT_DB_PAGE_SIZE 1024
# endif
#endif
typedef DBT Datum;
#define dsize size
#define dptr data
typedef DB *LDBM;
#define DB_TYPE DB_HASH
/* for ldbm_open */
#ifdef LDBM_USE_DB2
# define LDBM_READER DB_RDONLY
# define LDBM_WRITER 0x00000 /* hopefully */
# define LDBM_WRCREAT (DB_NOMMAP|DB_CREATE|DB_THREAD)
# define LDBM_NEWDB (DB_TRUNCATE|DB_CREATE|DB_THREAD)
#else
# define LDBM_READER O_RDONLY
# define LDBM_WRITER O_RDWR
# define LDBM_WRCREAT (O_RDWR|O_CREAT)
# define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT)
# define LDBM_FAST 0
#endif
#define LDBM_SUFFIX ".dbh"
/* for ldbm_insert */
#define LDBM_INSERT R_NOOVERWRITE
#define LDBM_REPLACE 0
#define LDBM_SYNC 0x80000000
#elif defined( HAVE_GDBM )
/*****************************************************************
* *
@ -33,88 +147,8 @@ extern gdbm_error gdbm_errno;
#define LDBM_REPLACE GDBM_REPLACE
#define LDBM_SYNC 0x80000000
#else /* end of gdbm */
#ifdef LDBM_USE_DBHASH
/*****************************************************************
* *
* use berkeley db hash package *
* *
*****************************************************************/
#include <sys/types.h>
#include <limits.h>
#include <fcntl.h>
#include <db.h>
typedef DBT Datum;
#define dsize size
#define dptr data
typedef DB *LDBM;
#define DB_TYPE DB_HASH
/* for ldbm_open */
#define LDBM_READER O_RDONLY
#define LDBM_WRITER O_RDWR
#define LDBM_WRCREAT (O_RDWR|O_CREAT)
#define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT)
#define LDBM_FAST 0
#define LDBM_SUFFIX ".dbh"
/* for ldbm_insert */
#define LDBM_INSERT R_NOOVERWRITE
#define LDBM_REPLACE 0
#define LDBM_SYNC 0x80000000
extern int errno;
#else /* end of db hash */
#ifdef LDBM_USE_DBBTREE
/*****************************************************************
* *
* use berkeley db btree package *
* *
*****************************************************************/
#include <sys/types.h>
#include <limits.h>
#include <fcntl.h>
#include <db.h>
typedef DBT Datum;
#define dsize size
#define dptr data
typedef DB *LDBM;
#define DB_TYPE DB_BTREE
/* for ldbm_open */
#define LDBM_READER O_RDONLY
#define LDBM_WRITER O_RDWR
#define LDBM_WRCREAT (O_RDWR|O_CREAT)
#define LDBM_NEWDB (O_RDWR|O_TRUNC|O_CREAT)
#define LDBM_FAST 0
#define LDBM_SUFFIX ".dbb"
#define LDBM_ORDERED 1
/* for ldbm_insert */
#define LDBM_INSERT R_NOOVERWRITE
#define LDBM_REPLACE 0
#define LDBM_SYNC 0x80000000
extern int errno;
#else /* end of db btree */
#ifdef LDBM_USE_NDBM
#elif defined( HAVE_NDBM )
/*****************************************************************
* *
@ -123,7 +157,8 @@ extern int errno;
*****************************************************************/
#include <ndbm.h>
#ifndef O_RDONLY
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
@ -145,11 +180,9 @@ typedef DBM *LDBM;
#define LDBM_REPLACE DBM_REPLACE
#define LDBM_SYNC 0
#endif /* ndbm */
#endif /* db hash */
#endif /* db btree */
#endif /* gdbm */
#endif
int ldbm_errno( LDBM ldbm );
LDBM ldbm_open( char *name, int rw, int mode, int dbcachesize );
void ldbm_close( LDBM ldbm );
void ldbm_sync( LDBM ldbm );
@ -158,8 +191,14 @@ Datum ldbm_datum_dup( LDBM ldbm, Datum data );
Datum ldbm_fetch( LDBM ldbm, Datum key );
int ldbm_store( LDBM ldbm, Datum key, Datum data, int flags );
int ldbm_delete( LDBM ldbm, Datum key );
Datum ldbm_firstkey( LDBM ldbm );
Datum ldbm_nextkey( LDBM ldbm, Datum key );
int ldbm_errno( LDBM ldbm );
#if HAVE_BERKELEY_DB2
void *ldbm_malloc( size_t size );
Datum ldbm_firstkey( LDBM ldbm, DBC **dbch );
Datum ldbm_nextkey( LDBM ldbm, Datum key, DBC *dbcp );
#else
Datum ldbm_firstkey( LDBM ldbm );
Datum ldbm_nextkey( LDBM ldbm, Datum key );
#endif
#endif /* _ldbm_h_ */

View File

@ -1,4 +1,13 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* Portions
* Copyright (c) 1996 Regents of the University of Michigan.
* All rights reserved.
*
@ -13,9 +22,9 @@
#ifndef _LDIF_H
#define _LDIF_H
#ifdef __cplusplus
extern "C" {
#endif
#include <ldap_cdefs.h>
LDAP_BEGIN_DECL
#define LINE_WIDTH 76 /* maximum length of LDIF lines */
@ -34,23 +43,13 @@ extern "C" {
*/
#define LDIF_SIZE_NEEDED(tlen,vlen) \
((tlen) + 4 + LDIF_BASE64_LEN(vlen) \
+ ((LDIF_BASE64_LEN(vlen) + tlen + 3) / LINE_WIDTH * 2 ))
+ ((LDIF_BASE64_LEN(vlen) + (tlen) + 3) / LINE_WIDTH * 2 ))
int str_parse_line LDAP_P(( char *line, char **type, char **value, int *vlen));
char * str_getline LDAP_P(( char **next ));
void put_type_and_value LDAP_P(( char **out, char *t, char *val, int vlen ));
char *ldif_type_and_value LDAP_P(( char *type, char *val, int vlen ));
#ifdef NEEDPROTOS
int str_parse_line( char *line, char **type, char **value, int *vlen);
char * str_getline( char **next );
void put_type_and_value( char **out, char *t, char *val, int vlen );
char *ldif_type_and_value( char *type, char *val, int vlen );
#else /* NEEDPROTOS */
int str_parse_line();
char * str_getline();
void put_type_and_value();
char *ldif_type_and_value();
#endif /* NEEDPROTOS */
#ifdef __cplusplus
}
#endif
LDAP_END_DECL
#endif /* _LDIF_H */

View File

@ -1,3 +1,12 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* lthread.h - ldap threads header file */
#ifndef _LTHREAD_H

56
include/lthread_rdwr.h Normal file
View File

@ -0,0 +1,56 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _LTHREAD_RDWR_H
#define _LTHREAD_RDWR_H 1
/********************************************************
* An example source module to accompany...
*
* "Using POSIX Threads: Programming with Pthreads"
* by Brad nichols, Dick Buttlar, Jackie Farrell
* O'Reilly & Associates, Inc.
*
********************************************************
*
* Include file for reader/writer locks
*
*/
#include <ldap_cdefs.h>
LDAP_BEGIN_DECL
typedef struct rdwr_var {
int readers_reading;
int writer_writing;
pthread_mutex_t mutex;
pthread_cond_t lock_free;
} pthread_rdwr_t;
typedef void * pthread_rdwrattr_t;
#define pthread_rdwrattr_default NULL;
LDAP_F int pthread_rdwr_init_np LDAP_P((pthread_rdwr_t *rdwrp, pthread_rdwrattr_t *attrp));
LDAP_F int pthread_rdwr_rlock_np LDAP_P((pthread_rdwr_t *rdwrp));
LDAP_F int pthread_rdwr_runlock_np LDAP_P((pthread_rdwr_t *rdwrp));
LDAP_F int pthread_rdwr_wlock_np LDAP_P((pthread_rdwr_t *rdwrp));
LDAP_F int pthread_rdwr_wunlock_np LDAP_P((pthread_rdwr_t *rdwrp));
#ifdef LDAP_DEBUG
LDAP_F int pthread_rdwr_rchk_np LDAP_P((pthread_rdwr_t *rdwrp));
LDAP_F int pthread_rdwr_wchk_np LDAP_P((pthread_rdwr_t *rdwrp));
LDAP_F int pthread_rdwr_rwchk_np LDAP_P((pthread_rdwr_t *rdwrp));
#endif /* LDAP_DEBUG */
LDAP_END_DECL
#endif /* _LTHREAD_RDWR_H */

View File

@ -1,3 +1,13 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _LUTIL_H
#define _LUTIL_H 1

View File

@ -1,3 +1,13 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* See md5.c for explanation and copyright information. */
#ifndef _LUTIL_MD5_H_

View File

@ -1,3 +1,13 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* This version is based on:
* $OpenBSD: sha1.h,v 1.8 1997/07/15 01:54:23 millert Exp $ */

View File

@ -1,4 +1,13 @@
/* portable.h.bot begin */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifdef HAVE_STDDEF_H
# include <stddef.h>

View File

@ -1,33 +1,14 @@
/* include/portable.h.in. Generated automatically from configure.in by autoheader. */
/* portable.h.top begin */
/*
Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA
All rights reserved.
Redistribution and use in source and binary forms are permitted only
as authorized by the OpenLDAP Public License. A copy of this
license is available at http://www.OpenLDAP.org/license.html or
in file LICENSE in the top-level directory of the distribution.
This work is derived from the University of Michigan LDAP v3.3
distribution. Information concerning is available at
http://www.umich.edu/~dirsvcs/ldap/ldap.html.
This work also contains materials derived from public sources.
---
Portions Copyright (c) 1992-1996 Regents of the University of Michigan.
All rights reserved.
Redistribution and use in source and binary forms are permitted
provided that this notice is preserved and that due credit is given
to the University of Michigan at Ann Arbor. The name of the University
may not be used to endorse or promote products derived from this
software without specific prior written permission. This software
is provided ``as is'' without express or implied warranty.
*/
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _LDAP_PORTABLE_H
#define _LDAP_PORTABLE_H
@ -612,6 +593,15 @@ is provided ``as is'' without express or implied warranty.
/* Define if you have the socket library (-lsocket). */
#undef HAVE_LIBSOCKET
/* portable.h.bot begin */
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifdef HAVE_STDDEF_H
# include <stddef.h>

View File

@ -1,32 +1,13 @@
/* portable.h.top begin */
/*
Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA
All rights reserved.
Redistribution and use in source and binary forms are permitted only
as authorized by the OpenLDAP Public License. A copy of this
license is available at http://www.OpenLDAP.org/license.html or
in file LICENSE in the top-level directory of the distribution.
This work is derived from the University of Michigan LDAP v3.3
distribution. Information concerning is available at
http://www.umich.edu/~dirsvcs/ldap/ldap.html.
This work also contains materials derived from public sources.
---
Portions Copyright (c) 1992-1996 Regents of the University of Michigan.
All rights reserved.
Redistribution and use in source and binary forms are permitted
provided that this notice is preserved and that due credit is given
to the University of Michigan at Ann Arbor. The name of the University
may not be used to endorse or promote products derived from this
software without specific prior written permission. This software
is provided ``as is'' without express or implied warranty.
*/
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#ifndef _LDAP_PORTABLE_H
#define _LDAP_PORTABLE_H

View File

@ -1,4 +1,13 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* Portions
* Copyright (c) 1993, 1994 Regents of the University of Michigan.
* All rights reserved.
*
@ -17,10 +26,9 @@
#ifndef _SRCHPREF_H
#define _SRCHPREF_H
#ifdef __cplusplus
extern "C" {
#endif
#include <ldap_cdefs.h>
LDAP_BEGIN_DECL
struct ldap_searchattr {
char *sa_attrlabel;
@ -60,7 +68,7 @@ struct ldap_searchobj {
#define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
#define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \
(((so)->so_options & option ) != 0 )
(((so)->so_options & (option) ) != 0 )
#define LDAP_SEARCHPREF_VERSION_ZERO 0
#define LDAP_SEARCHPREF_VERSION 1
@ -71,36 +79,26 @@ struct ldap_searchobj {
#define LDAP_SEARCHPREF_ERR_FILE 4
#ifndef NEEDPROTOS
int ldap_init_searchprefs();
int ldap_init_searchprefs_buf();
void ldap_free_searchprefs();
struct ldap_searchobj *ldap_first_searchobj();
struct ldap_searchobj *ldap_next_searchobj();
LDAP_F int
ldap_init_searchprefs LDAP_P(( char *file,
struct ldap_searchobj **solistp ));
#else /* !NEEDPROTOS */
LDAP_F int
ldap_init_searchprefs_buf LDAP_P(( char *buf,
long buflen,
struct ldap_searchobj **solistp ));
LDAPFUNCDECL int
ldap_init_searchprefs( char *file, struct ldap_searchobj **solistp );
LDAP_F void
ldap_free_searchprefs LDAP_P(( struct ldap_searchobj *solist ));
LDAPFUNCDECL int
ldap_init_searchprefs_buf( char *buf, long buflen,
struct ldap_searchobj **solistp );
LDAP_F struct ldap_searchobj *
ldap_first_searchobj LDAP_P(( struct ldap_searchobj *solist ));
LDAPFUNCDECL void
ldap_free_searchprefs( struct ldap_searchobj *solist );
LDAPFUNCDECL struct ldap_searchobj *
ldap_first_searchobj( struct ldap_searchobj *solist );
LDAPFUNCDECL struct ldap_searchobj *
ldap_next_searchobj( struct ldap_searchobj *sollist,
struct ldap_searchobj *so );
#endif /* !NEEDPROTOS */
LDAP_F struct ldap_searchobj *
ldap_next_searchobj LDAP_P(( struct ldap_searchobj *sollist,
struct ldap_searchobj *so ));
#ifdef __cplusplus
}
#endif
LDAP_END_DECL
#endif /* _SRCHPREF_H */

View File

@ -1,4 +1,13 @@
/*
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
/* Portions
* Copyright (c) 1987 Regents of the University of California.
* All rights reserved.
*

View File

@ -1,3 +1,5 @@
## Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
##
## LIBLBER
##

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1991 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,20 +1,30 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
#if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI )
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <ac/ctype.h>
#include <ac/string.h>
#endif /* LDAP_DEBUG && LDAP_LIBUI */
#include "lber.h"
/*
* Print arbitrary stuff, for debugging.
*/
#ifdef LDAP_DEBUG
#ifndef NO_USERINTERFACE
#define BPLEN 48
void
lber_bprint( char *data, int len )
{
#if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI )
#define BPLEN 48
static char hexdig[] = "0123456789abcdef";
char out[ BPLEN ];
int i = 0;
@ -49,12 +59,7 @@ lber_bprint( char *data, int len )
}
out[ i++ ] = ' ';
}
}
#else /* NO_USERINTERFACE */
void
lber_bprint( char *data, int len )
{
}
#endif /* NO_USERINTERFACE */
#endif
#endif /* LDAP_DEBUG && LDAP_LIBUI */
}

View File

@ -1,5 +1,9 @@
/* decode.c - ber input decoding routines */
/*
* Copyright 1998-1999 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.
*

View File

@ -1,5 +1,9 @@
/* dtest.c - lber decoding test program */
/*
* Copyright 1998-1999 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.
*

View File

@ -1,5 +1,9 @@
/* encode.c - ber output encoding routines */
/*
* Copyright 1998-1999 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.
*

View File

@ -1,5 +1,9 @@
/* test.c - lber encoding test program */
/*
* Copyright 1998-1999 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.
*/

View File

@ -1,5 +1,9 @@
/* idtest.c - ber decoding test program using isode libraries */
/*
* Copyright 1998-1999 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.
*

View File

@ -1,5 +1,9 @@
/* io.c - ber general i/o routines */
/*
* Copyright 1998-1999 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.
*

View File

@ -1,3 +1,5 @@
## Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
##
## Makefile.in for LDAP -lldap
##

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1991 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,41 +1,29 @@
/*
* Copyright 1998-1999 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.
*
* abandon.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <string.h>
#if !defined( MACOS ) && !defined( DOS )
#include <sys/types.h>
#include <sys/socket.h>
#endif
#if defined( DOS ) || defined( _WIN32 )
#include <malloc.h>
#include "msdos.h"
#endif /* DOS */
#ifdef MACOS
#include <stdlib.h>
#include "macos.h"
#endif /* MACOS */
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"
#include "ldap-int.h"
#ifdef NEEDPROTOS
static int do_abandon( LDAP *ld, int origid, int msgid );
#else /* NEEDPROTOS */
static int do_abandon();
#endif /* NEEDPROTOS */
static int do_abandon LDAP_P(( LDAP *ld, int origid, int msgid ));
/*
* ldap_abandon - perform an ldap (and X.500) abandon operation. Parameters:
*
@ -107,22 +95,22 @@ do_abandon( LDAP *ld, int origid, int msgid )
err = 0;
if ( sendabandon ) {
/* create a message to send */
if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) {
if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
err = -1;
ld->ld_errno = LDAP_NO_MEMORY;
} else {
#ifdef CLDAP
#ifdef LDAP_CONNECTIONLESS
if ( ld->ld_sb.sb_naddr > 0 ) {
err = ber_printf( ber, "{isti}",
++ld->ld_msgid, ld->ld_cldapdn,
LDAP_REQ_ABANDON, msgid );
} else {
#endif /* CLDAP */
#endif /* LDAP_CONNECTIONLESS */
err = ber_printf( ber, "{iti}", ++ld->ld_msgid,
LDAP_REQ_ABANDON, msgid );
#ifdef CLDAP
#ifdef LDAP_CONNECTIONLESS
}
#endif /* CLDAP */
#endif /* LDAP_CONNECTIONLESS */
if ( err == -1 ) {
ld->ld_errno = LDAP_ENCODING_ERROR;
@ -151,10 +139,10 @@ do_abandon( LDAP *ld, int origid, int msgid )
#ifdef LDAP_REFERRALS
if ( lr != NULL ) {
if ( sendabandon ) {
free_connection( ld, lr->lr_conn, 0, 1 );
ldap_free_connection( ld, lr->lr_conn, 0, 1 );
}
if ( origid == msgid ) {
free_request( ld, lr );
ldap_free_request( ld, lr );
}
}
#endif /* LDAP_REFERRALS */

View File

@ -1,30 +1,21 @@
/*
* Copyright 1998-1999 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.
*
* add.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <string.h>
#ifdef MACOS
#include "macos.h"
#endif /* MACOS */
#if defined( DOS ) || defined( _WIN32 )
#include <malloc.h>
#include "msdos.h"
#endif /* DOS */
#if !defined( MACOS ) && !defined( DOS )
#include <sys/types.h>
#include <sys/socket.h>
#endif /* !MACOS && !DOS */
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"
@ -69,7 +60,7 @@ ldap_add( LDAP *ld, char *dn, LDAPMod **attrs )
Debug( LDAP_DEBUG_TRACE, "ldap_add\n", 0, 0, 0 );
/* create a message to send */
if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) {
if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
return( -1 );
}
@ -103,7 +94,7 @@ ldap_add( LDAP *ld, char *dn, LDAPMod **attrs )
}
/* send the message */
return( send_initial_request( ld, LDAP_REQ_ADD, dn, ber ));
return( ldap_send_initial_request( ld, LDAP_REQ_ADD, dn, ber ));
}
int

View File

@ -1,29 +1,23 @@
/*
* Copyright 1998-1999 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.
*
* addentry.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#ifdef MACOS
#include <stdlib.h>
#include "macos.h"
#else /* MACOS */
#if defined( DOS ) || defined( _WIN32 )
#include <malloc.h>
#include "msdos.h"
#else /* DOS */
#include <sys/types.h>
#include <sys/socket.h>
#endif /* DOS */
#endif /* MACOS */
#include <ac/ctype.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"

View File

@ -1,31 +1,22 @@
/*
* Copyright 1998-1999 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.
*
* bind.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <string.h>
#ifdef MACOS
#include <stdlib.h>
#include "macos.h"
#else /* MACOS */
#ifdef DOS
#include "msdos.h"
#ifdef NCSA
#include "externs.h"
#endif /* NCSA */
#else /* DOS */
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#endif /* DOS */
#endif /* MACOS */
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"
@ -54,7 +45,7 @@ ldap_bind( LDAP *ld, char *dn, char *passwd, int authmethod )
* name DistinguishedName, -- who
* authentication CHOICE {
* simple [0] OCTET STRING -- passwd
#ifdef KERBEROS
#ifdef HAVE_KERBEROS
* krbv42ldap [1] OCTET STRING
* krbv42dsa [2] OCTET STRING
#endif
@ -69,7 +60,7 @@ ldap_bind( LDAP *ld, char *dn, char *passwd, int authmethod )
case LDAP_AUTH_SIMPLE:
return( ldap_simple_bind( ld, dn, passwd ) );
#ifdef KERBEROS
#ifdef HAVE_KERBEROS
case LDAP_AUTH_KRBV41:
return( ldap_kerberos_bind1( ld, dn ) );
@ -106,7 +97,7 @@ ldap_bind_s( LDAP *ld, char *dn, char *passwd, int authmethod )
case LDAP_AUTH_SIMPLE:
return( ldap_simple_bind_s( ld, dn, passwd ) );
#ifdef KERBEROS
#ifdef HAVE_KERBEROS
case LDAP_AUTH_KRBV4:
return( ldap_kerberos_bind_s( ld, dn ) );

View File

@ -1,63 +1,43 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1993 The Regents of the University of Michigan.
* All rights reserved.
*
* cache.c - local caching support for LDAP
*/
#ifndef NO_CACHE
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1993 The Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <string.h>
#ifdef MACOS
#include <stdlib.h>
#include <time.h>
#include "macos.h"
#else /* MACOS */
#if defined( DOS ) || defined( _WIN32 )
#include <malloc.h>
#include "msdos.h"
#ifdef NCSA
#include "externs.h"
#endif /* NCSA */
#ifdef WINSOCK
#include <time.h>
#endif /* WINSOCK */
#else /* DOS */
#include <sys/types.h>
#include <sys/socket.h>
#endif /* DOS */
#endif /* MACOS */
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"
#include "ldap-int.h"
#ifdef NEEDPROTOS
static int cache_hash( BerElement *ber );
static LDAPMessage *msg_dup( LDAPMessage *msg );
static int request_cmp( BerElement *req1, BerElement *req2 );
static int chain_contains_dn( LDAPMessage *msg, char *dn );
static long msg_size( LDAPMessage *msg );
static void check_cache_memused( LDAPCache *lc );
static void uncache_entry_or_req( LDAP *ld, char *dn, int msgid );
#else /* NEEDPROTOS */
static int cache_hash();
static LDAPMessage *msg_dup();
static int request_cmp();
static int chain_contains_dn();
static long msg_size();
static void check_cache_memused();
static void uncache_entry_or_req();
#endif /* NEEDPROTOS */
#ifndef LDAP_NOCACHE
static int cache_hash LDAP_P(( BerElement *ber ));
static LDAPMessage *msg_dup LDAP_P(( LDAPMessage *msg ));
static int request_cmp LDAP_P(( BerElement *req1, BerElement *req2 ));
static int chain_contains_dn LDAP_P(( LDAPMessage *msg, char *dn ));
static long msg_size LDAP_P(( LDAPMessage *msg ));
static void check_cache_memused LDAP_P(( LDAPCache *lc ));
static void uncache_entry_or_req LDAP_P(( LDAP *ld, char *dn, int msgid ));
#endif
int
ldap_enable_cache( LDAP *ld, long timeout, long maxmem )
{
#ifndef LDAP_NOCACHE
if ( ld->ld_cache == NULLLDCACHE ) {
if (( ld->ld_cache = (LDAPCache *)malloc( sizeof( LDAPCache )))
== NULLLDCACHE ) {
@ -73,15 +53,20 @@ ldap_enable_cache( LDAP *ld, long timeout, long maxmem )
check_cache_memused( ld->ld_cache );
ld->ld_cache->lc_enabled = 1;
return( 0 );
#else
return( -1 );
#endif
}
void
ldap_disable_cache( LDAP *ld )
{
#ifndef LDAP_NOCACHE
if ( ld->ld_cache != NULLLDCACHE ) {
ld->ld_cache->lc_enabled = 0;
}
#endif
}
@ -89,26 +74,31 @@ ldap_disable_cache( LDAP *ld )
void
ldap_set_cache_options( LDAP *ld, unsigned long opts )
{
#ifndef LDAP_NOCACHE
if ( ld->ld_cache != NULLLDCACHE ) {
ld->ld_cache->lc_options = opts;
}
#endif
}
void
ldap_destroy_cache( LDAP *ld )
{
#ifndef LDAP_NOCACHE
if ( ld->ld_cache != NULLLDCACHE ) {
ldap_flush_cache( ld );
free( (char *)ld->ld_cache );
ld->ld_cache = NULLLDCACHE;
}
#endif
}
void
ldap_flush_cache( LDAP *ld )
{
#ifndef LDAP_NOCACHE
int i;
LDAPMessage *m, *next;
@ -133,29 +123,36 @@ ldap_flush_cache( LDAP *ld )
}
ld->ld_cache->lc_memused = sizeof( LDAPCache );
}
#endif
}
void
ldap_uncache_request( LDAP *ld, int msgid )
{
Debug( LDAP_DEBUG_TRACE, "ldap_uncache_request %d ld_cache %x\n",
msgid, ld->ld_cache, 0 );
#ifndef LDAP_NOCACHE
Debug( LDAP_DEBUG_TRACE, "ldap_uncache_request %d ld_cache %lx\n",
msgid, (long) ld->ld_cache, 0 );
uncache_entry_or_req( ld, NULL, msgid );
#endif
}
void
ldap_uncache_entry( LDAP *ld, char *dn )
{
Debug( LDAP_DEBUG_TRACE, "ldap_uncache_entry %s ld_cache %x\n",
dn, ld->ld_cache, 0 );
#ifndef LDAP_NOCACHE
Debug( LDAP_DEBUG_TRACE, "ldap_uncache_entry %s ld_cache %lx\n",
dn, (long) ld->ld_cache, 0 );
uncache_entry_or_req( ld, dn, 0 );
#endif
}
#ifndef LDAP_NOCACHE
static void
uncache_entry_or_req( LDAP *ld,
char *dn, /* if non-NULL, uncache entry */
@ -165,8 +162,8 @@ uncache_entry_or_req( LDAP *ld,
LDAPMessage *m, *prev, *next;
Debug( LDAP_DEBUG_TRACE,
"ldap_uncache_entry_or_req dn %s msgid %d ld_cache %x\n",
dn, msgid, ld->ld_cache );
"ldap_uncache_entry_or_req dn %s msgid %d ld_cache %lx\n",
dn, msgid, (long) ld->ld_cache );
if ( ld->ld_cache == NULLLDCACHE ) {
return;
@ -212,14 +209,16 @@ uncache_entry_or_req( LDAP *ld,
}
}
#endif
void
add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
ldap_add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
{
#ifndef LDAP_NOCACHE
LDAPMessage *new;
long len;
Debug( LDAP_DEBUG_TRACE, "add_request_to_cache\n", 0, 0, 0 );
Debug( LDAP_DEBUG_TRACE, "ldap_add_request_to_cache\n", 0, 0, 0 );
ld->ld_errno = LDAP_SUCCESS;
if ( ld->ld_cache == NULLLDCACHE ||
@ -229,7 +228,7 @@ add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
if (( new = (LDAPMessage *) calloc( 1, sizeof(LDAPMessage) ))
!= NULL ) {
if (( new->lm_ber = alloc_ber_with_options( ld )) == NULLBER ) {
if (( new->lm_ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
free( (char *)new );
return;
}
@ -252,16 +251,18 @@ add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
} else {
ld->ld_errno = LDAP_NO_MEMORY;
}
#endif
}
void
add_result_to_cache( LDAP *ld, LDAPMessage *result )
ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result )
{
#ifndef LDAP_NOCACHE
LDAPMessage *m, **mp, *req, *new, *prev;
int err, keep;
Debug( LDAP_DEBUG_TRACE, "add_result_to_cache: id %d, type %d\n",
Debug( LDAP_DEBUG_TRACE, "ldap_add_result_to_cache: id %d, type %d\n",
result->lm_msgid, result->lm_msgtype, 0 );
if ( ld->ld_cache == NULLLDCACHE ||
@ -358,6 +359,7 @@ add_result_to_cache( LDAP *ld, LDAPMessage *result )
Debug( LDAP_DEBUG_TRACE, "artc: msgid not in request list\n",
0, 0, 0 );
}
#endif
}
@ -369,14 +371,15 @@ add_result_to_cache( LDAP *ld, LDAPMessage *result )
* will find them.
*/
int
check_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
ldap_check_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
{
#ifndef LDAP_NOCACHE
LDAPMessage *m, *new, *prev, *next;
BerElement reqber;
int first, hash;
unsigned long validtime;
Debug( LDAP_DEBUG_TRACE, "check_cache\n", 0, 0, 0 );
Debug( LDAP_DEBUG_TRACE, "ldap_check_cache\n", 0, 0, 0 );
if ( ld->ld_cache == NULLLDCACHE ||
( ld->ld_cache->lc_enabled == 0 )) {
@ -444,8 +447,12 @@ check_cache( LDAP *ld, unsigned long msgtype, BerElement *request )
Debug( LDAP_DEBUG_TRACE, "cc: result returned from cache\n", 0, 0, 0 );
return( 0 );
#else
return( -1 );
#endif
}
#ifndef LDAP_NOCACHE
static int
cache_hash( BerElement *ber )
@ -524,7 +531,9 @@ request_cmp( BerElement *req1, BerElement *req2 )
/*
* check remaining length and bytes if necessary
*/
if (( len = r1.ber_end - r1.ber_ptr ) != r2.ber_end - r2.ber_ptr ) {
if (( len = r1.ber_end - r1.ber_ptr ) !=
(unsigned long) (r2.ber_end - r2.ber_ptr) )
{
return( -1 ); /* different lengths */
}
return( memcmp( r1.ber_ptr, r2.ber_ptr, (size_t)len ));

View File

@ -1,38 +1,29 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*
* charset.c
*/
#if defined( DOS ) || defined( _WIN32 )
/*
* This MUST precede "#ifdef STR_TRANSLATION"
* because STR_TRANSLATION and friends are defined in msdos.h.
*/
#include "msdos.h"
#endif /* DOS */
#include "portable.h"
#ifdef STR_TRANSLATION
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include <stdio.h>
#include <string.h>
#ifdef MACOS
#include <stdlib.h>
#include "macos.h"
#endif /* MACOS */
#if !defined(MACOS) && !defined(DOS) && !defined( _WIN32 ) && !defined(VMS)
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include "lber.h"
#include "ldap.h"
#include "ldap-int.h"
@ -159,7 +150,7 @@ ldap_translate_to_t61( LDAP *ld, char **bufp, unsigned long *lenp,
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ac/string.h>
/* Character set used: ISO 8859-1, ISO 8859-2, ISO 8859-3, ... */
/* #define ISO_8859 1 */
@ -171,17 +162,10 @@ ldap_translate_to_t61( LDAP *ld, char **bufp, unsigned long *lenp,
typedef unsigned char Byte;
typedef struct { Byte a, b; } Couple;
#ifdef NEEDPROTOS
static Byte *c_to_hh( Byte *o, Byte c );
static Byte *c_to_cc( Byte *o, Couple *cc, Byte c );
static int hh_to_c( Byte *h );
static Byte *cc_to_t61( Byte *o, Byte *s );
#else /* NEEDPROTOS */
static Byte *c_to_hh();
static Byte *c_to_cc();
static int hh_to_c();
static Byte *cc_to_t61();
#endif /* NEEDPROTOS */
static Byte *c_to_hh LDAP_P(( Byte *o, Byte c ));
static Byte *c_to_cc LDAP_P(( Byte *o, Couple *cc, Byte c ));
static int hh_to_c LDAP_P(( Byte *h ));
static Byte *cc_to_t61 LDAP_P(( Byte *o, Byte *s ));
/*
Character choosed as base in diacritics alone: NO-BREAK SPACE.

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1990, 1994 Regents of the University of Michigan.
* All rights reserved.
*
@ -9,10 +13,6 @@
#ifdef LDAP_CONNECTIONLESS
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990, 1994 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,25 +1,21 @@
/*
* Copyright 1998-1999 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.
*
* compare.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <string.h>
#ifdef MACOS
#include "macos.h"
#endif /* MACOS */
#if !defined( MACOS ) && !defined( DOS )
#include <sys/types.h>
#include <sys/socket.h>
#endif
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"
@ -52,7 +48,7 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value )
Debug( LDAP_DEBUG_TRACE, "ldap_compare\n", 0, 0, 0 );
/* create a message to send */
if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) {
if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
return( -1 );
}
@ -63,19 +59,19 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value )
return( -1 );
}
#ifndef NO_CACHE
#ifndef LDAP_NOCACHE
if ( ld->ld_cache != NULL ) {
if ( check_cache( ld, LDAP_REQ_COMPARE, ber ) == 0 ) {
if ( ldap_check_cache( ld, LDAP_REQ_COMPARE, ber ) == 0 ) {
ber_free( ber, 1 );
ld->ld_errno = LDAP_SUCCESS;
return( ld->ld_msgid );
}
add_request_to_cache( ld, LDAP_REQ_COMPARE, ber );
ldap_add_request_to_cache( ld, LDAP_REQ_COMPARE, ber );
}
#endif /* NO_CACHE */
#endif /* LDAP_NOCACHE */
/* send the message */
return ( send_initial_request( ld, LDAP_REQ_COMPARE, dn, ber ));
return ( ldap_send_initial_request( ld, LDAP_REQ_COMPARE, dn, ber ));
}
int

View File

@ -1,29 +1,21 @@
/*
* Copyright 1998-1999 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.
*
* delete.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <string.h>
#ifdef MACOS
#include "macos.h"
#endif /* MACOS */
#if defined( DOS ) || defined( _WIN32 )
#include "msdos.h"
#endif /* DOS */
#if !defined( MACOS ) && !defined( DOS )
#include <sys/types.h>
#include <sys/socket.h>
#endif
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"
@ -51,7 +43,7 @@ ldap_delete( LDAP *ld, char *dn )
Debug( LDAP_DEBUG_TRACE, "ldap_delete\n", 0, 0, 0 );
/* create a message to send */
if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) {
if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
return( -1 );
}
@ -63,7 +55,7 @@ ldap_delete( LDAP *ld, char *dn )
}
/* send the message */
return ( send_initial_request( ld, LDAP_REQ_DELETE, dn, ber ));
return ( ldap_send_initial_request( ld, LDAP_REQ_DELETE, dn, ber ));
}

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1993, 1994 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1993, 1994 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,3 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
#include <stdio.h>

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1994 The Regents of the University of Michigan.
* All rights reserved.
*
@ -6,26 +10,14 @@
* link in lots of extra code when not using certain features
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1994 The Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#ifdef MACOS
#include <stdlib.h>
#include "macos.h"
#else /* MACOS */
#ifdef DOS
#include <malloc.h>
#include "msdos.h"
#else /* DOS */
#include <sys/types.h>
#include <stdlib.h>
#endif /* DOS */
#endif /* MACOS */
#include <ac/ctype.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 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.
*
@ -7,10 +11,6 @@
#include "portable.h"
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,29 +1,23 @@
/*
* Copyright 1998-1999 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.
*
* getattr.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#ifdef MACOS
#include <stdlib.h>
#include "macos.h"
#else /* MACOS */
#if defined( DOS ) || defined( _WIN32 )
#include <malloc.h>
#include "msdos.h"
#else /* DOS */
#include <sys/types.h>
#include <sys/socket.h>
#endif /* DOS */
#endif /* MACOS */
#include <ac/ctype.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"
@ -36,7 +30,7 @@ ldap_first_attribute( LDAP *ld, LDAPMessage *entry, BerElement **ber )
Debug( LDAP_DEBUG_TRACE, "ldap_first_attribute\n", 0, 0, 0 );
if ( (*ber = alloc_ber_with_options( ld )) == NULLBER ) {
if ( (*ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
return( NULL );
}

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1994 Regents of the University of Michigan.
* All rights reserved.
*
@ -7,10 +11,6 @@
#include "portable.h"
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,29 +1,23 @@
/*
* Copyright 1998-1999 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.
*
* getentry.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#ifdef MACOS
#include <stdlib.h>
#include "macos.h"
#else /* MACOS */
#if defined( DOS ) || defined( _WIN32 )
#include <malloc.h>
#include "msdos.h"
#else /* DOS */
#include <sys/types.h>
#include <sys/socket.h>
#endif /* DOS */
#endif /* MACOS */
#include <ac/ctype.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1993 Regents of the University of Michigan.
* All rights reserved.
*
@ -7,10 +11,6 @@
#include "portable.h"
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,29 +1,23 @@
/*
* Copyright 1998-1999 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.
*
* getvalues.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#ifdef MACOS
#include <stdlib.h>
#include "macos.h"
#else /* MACOS */
#if defined( DOS ) || defined( _WIN32 )
#include <malloc.h>
#include "msdos.h"
#else /* DOS */
#include <sys/types.h>
#include <sys/socket.h>
#endif /* DOS */
#endif /* MACOS */
#include <ac/ctype.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"

View File

@ -1,3 +1,7 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
#include <stdio.h>

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1993 Regents of the University of Michigan.
* All rights reserved.
*
@ -7,10 +11,6 @@
#include "portable.h"
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#ifdef HAVE_KERBEROS
#include <stdio.h>

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,25 +1,21 @@
/*
* Copyright 1998-1999 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.
*
* modify.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <string.h>
#ifdef MACOS
#include "macos.h"
#endif /* MACOS */
#if !defined( MACOS ) && !defined( DOS )
#include <sys/types.h>
#include <sys/socket.h>
#endif
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"
@ -69,7 +65,7 @@ ldap_modify( LDAP *ld, char *dn, LDAPMod **mods )
Debug( LDAP_DEBUG_TRACE, "ldap_modify\n", 0, 0, 0 );
/* create a message to send */
if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) {
if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
return( -1 );
}
@ -105,7 +101,7 @@ ldap_modify( LDAP *ld, char *dn, LDAPMod **mods )
}
/* send the message */
return( send_initial_request( ld, LDAP_REQ_MODIFY, dn, ber ));
return( ldap_send_initial_request( ld, LDAP_REQ_MODIFY, dn, ber ));
}
int

View File

@ -1,25 +1,21 @@
/*
* Copyright 1998-1999 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.
*
* modrdn.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <string.h>
#ifdef MACOS
#include "macos.h"
#endif /* MACOS */
#if !defined( MACOS ) && !defined( DOS )
#include <sys/types.h>
#include <sys/socket.h>
#endif
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"
@ -53,7 +49,7 @@ ldap_modrdn2( LDAP *ld, char *dn, char *newrdn, int deleteoldrdn )
Debug( LDAP_DEBUG_TRACE, "ldap_modrdn\n", 0, 0, 0 );
/* create a message to send */
if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) {
if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
return( -1 );
}
@ -65,7 +61,7 @@ ldap_modrdn2( LDAP *ld, char *dn, char *newrdn, int deleteoldrdn )
}
/* send the message */
return ( send_initial_request( ld, LDAP_REQ_MODRDN, dn, ber ));
return ( ldap_send_initial_request( ld, LDAP_REQ_MODRDN, dn, ber ));
}
int

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*
@ -7,10 +11,6 @@
#include "portable.h"
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*
@ -7,10 +11,6 @@
#include "portable.h"
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 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.
*
@ -7,10 +11,6 @@
#include "portable.h"
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,25 +1,21 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1993 Regents of the University of Michigan.
* All rights reserved.
*
* sbind.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include "portable.h"
#include <stdio.h>
#include <string.h>
#ifdef MACOS
#include "macos.h"
#endif /* MACOS */
#if !defined( MACOS ) && !defined( DOS )
#include <sys/types.h>
#include <sys/socket.h>
#endif
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "lber.h"
#include "ldap.h"
@ -61,7 +57,7 @@ ldap_simple_bind( LDAP *ld, char *dn, char *passwd )
passwd = "";
/* create a message to send */
if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) {
if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
return( -1 );
}
@ -73,14 +69,14 @@ ldap_simple_bind( LDAP *ld, char *dn, char *passwd )
return( -1 );
}
#ifndef NO_CACHE
#ifndef LDAP_NOCACHE
if ( ld->ld_cache != NULL ) {
ldap_flush_cache( ld );
}
#endif /* !NO_CACHE */
#endif /* !LDAP_NOCACHE */
/* send the message */
return( send_initial_request( ld, LDAP_REQ_BIND, dn, ber ));
return( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber ));
}
/*

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 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.
*
@ -7,10 +11,6 @@
#include "portable.h"
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1994 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,4 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* Copyright (c) 1993, 1994 Regents of the University of Michigan.
* All rights reserved.
*

View File

@ -1,3 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
#include <stdlib.h>

View File

@ -1,3 +1,8 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
#include <stdio.h>

View File

@ -1,3 +1,7 @@
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/*
* tmplout.c: display template library output routines for LDAP clients
* 12 April 1994 by Mark C Smith

Some files were not shown because too many files have changed in this diff Show More