X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fslap.h;h=4792c0bb418109924d9008c5c2d23ff52f77ddd4;hb=6147119dc8526a758a7c576940fe8483e2b93915;hp=625890574f822cbf0d86540998d268ef9427a7c2;hpb=68d561a97b9f634f033eae0f2d9c7453ea02c4c7;p=openldap diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index 625890574f..4792c0bb41 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -1,4 +1,8 @@ /* slap.h - stand alone ldap server include file */ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ #ifndef _SLDAPD_H_ #define _SLDAPD_H_ @@ -11,6 +15,10 @@ #include #include +#ifdef HAVE_CYRUS_SASL +#include +#endif + #include "avl.h" #ifndef ldap_debug @@ -20,10 +28,8 @@ #include "ldap_log.h" -#include "lber.h" -#include "ldap.h" - -#include "ldap_schema.h" +#include +#include #include "ldap_pvt_thread.h" #include "ldif.h" @@ -56,9 +62,25 @@ LDAP_BEGIN_DECL #define MAXREMATCHES 10 +/* XXYYZ: these macros assume 'x' is an ASCII x */ #define DNSEPARATOR(c) ((c) == ',' || (c) == ';') #define SEPARATOR(c) ((c) == ',' || (c) == ';' || (c) == '+') #define SPACE(c) ((c) == ' ' || (c) == '\n') + +#define ASCII_LOWER(c) ( (c) >= 'a' && (c) <= 'z' ) +#define ASCII_UPPER(c) ( (c) >= 'A' && (c) <= 'Z' ) +#define ASCII_ALPHA(c) ( ASCII_LOWER(c) || ASCII_UPPER(c) ) +#define ASCII_DIGIT(c) ( (c) >= '0' && (c) <= '9' ) +#define ASCII_ALNUM(c) ( ASCII_ALPHA(c) || ASCII_DIGIT(c) ) + +#define LEADKEYCHAR(c) ( ASCII_ALPHA(c) ) +#define KEYCHAR(c) ( ASCII_ALNUM(c) || (c) == '-' ) +#define LEADOIDCHAR(c) ( ASCII_DIGIT(c) ) +#define OIDCHAR(c) ( ASCII_DIGIT(c) || (c) == '.' ) + +#define LEADATTRCHAR(c) ( LEADKEYCHAR(c) || LEADOIDCHAR(c) ) +#define ATTRCHAR(c) ( KEYCHAR((c)) || (c) == '.' ) + #define NEEDSESCAPE(c) ((c) == '\\' || (c) == '"') #define SLAP_SCHERR_OUTOFMEM 1 @@ -79,6 +101,12 @@ extern int slap_debug; struct slap_op; struct slap_conn; +struct replog_moddn { + char *newrdn; + int deloldrdn; + char *newsup; +}; + /* * represents an attribute value assertion (i.e., attr=value) */ @@ -121,6 +149,8 @@ typedef struct slap_filter { char *f_un_sub_final; } f_un_sub; } f_un; + +#define f_dn f_un.f_un_type /* used for DN indices */ #define f_type f_un.f_un_type #define f_ava f_un.f_un_ava #define f_avtype f_un.f_un_ava.ava_type @@ -400,6 +430,7 @@ struct slap_backend_db { /* these should be renamed from be_ to bd_ */ char **be_suffix; /* the DN suffixes of data in this backend */ char **be_nsuffix; /* the normalized DN suffixes in this backend */ + char **be_suffixAlias; /* pairs of DN suffix aliases and deref values */ char *be_root_dn; /* the magic "root" dn for this db */ char *be_root_ndn; /* the magic "root" normalized dn for this db */ char *be_root_pw; /* the magic "root" password for this db */ @@ -591,6 +622,10 @@ typedef struct slap_conn { char *c_peer_name; /* peer name (trans=addr:port) */ char *c_sock_name; /* sock name (trans=addr:port) */ +#ifdef HAVE_CYRUS_SASL + sasl_conn_t *c_sasl_context; +#endif + /* only can be changed by binding thread */ int c_bind_in_progress; /* multi-op bind in progress */