#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <regex.h>
+
+#include <ac/regex.h>
+#include <ac/socket.h>
+#include <ac/string.h>
#include "slap.h"
return( (b->a_access & ~ACL_SELF) >= access );
}
-#ifdef ACLGROUP
+#ifdef SLAPD_ACLGROUPS
if ( b->a_group != NULL && op->o_dn != NULL ) {
char buf[512];
return( (b->a_access & ~ACL_SELF) >= access );
}
}
-#endif /* ACLGROUP */
+#endif /* SLAPD_ACLGROUPS */
}
if ( odn ) free( odn );
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <regex.h>
+
+#include <ac/ctype.h>
+#include <ac/regex.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/unistd.h>
#include "slap.h"
-#include "portable.h"
extern Filter *str2filter();
extern struct acl *global_acl;
} else if ( strcasecmp( left, "dnattr" ) == 0 ) {
b->a_dnattr = strdup( right );
-#ifdef ACLGROUP
+#ifdef SLAPD_ACLGROUPS
} else if ( strcasecmp( left, "group" ) == 0 ) {
regtest(fname, lineno, right);
b->a_group = dn_upcase(strdup( right ));
-#endif /* ACLGROUP */
+#endif /* SLAPD_ACLGROUPS */
} else if ( strcasecmp( left, "domain" ) == 0 ) {
char *s;
regtest(fname, lineno, right);
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/time.h>
+#include <ac/socket.h>
+
#include "slap.h"
extern Backend *select_backend();
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
+
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+#endif
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
+
#include <sys/stat.h>
-#include "portable.h"
+
#include "slap.h"
extern char **charray_dup();
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
int
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "proto-back-ldbm.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "back-ldbm.h"
#define DEFAULT_CACHE_SIZE 1000
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
# define DEFAULT_DBCACHE_SIZE (100 * DEFAULT_DB_PAGE_SIZE)
#else
# define DEFAULT_DBCACHE_SIZE 100000
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/krb.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/unistd.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "proto-back-ldbm.h"
-#ifdef KERBEROS
-#ifdef KERBEROS_V
-#include <kerberosIV/krb.h>
-#else
-#include <krb.h>
-#endif /* KERBEROS_V */
-#endif /* KERBEROS */
-
-#ifdef LDAP_CRYPT
-/* change for crypted passwords -- lukeh */
-#ifdef __NeXT__
-extern char *crypt (char *key, char *salt);
-#else
-#include <unistd.h>
-#endif
-#endif /* LDAP_CRYPT */
-#ifdef LDAP_SHA1
+#ifdef SLAPD_SHA1
#include <lutil_sha1.h>
-#endif /* LDAP_SHA1 */
-#ifdef LDAP_MD5
+#endif /* SLAPD_SHA1 */
+
+#ifdef SLAPD_MD5
#include <lutil_md5.h>
-#endif /* LDAP_MD5 */
+#endif /* SLAPD_MD5 */
#include <lutil.h>
extern Attribute *attr_find();
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
extern int krbv4_ldap_auth();
#endif
-#ifdef LDAP_CRYPT
+#ifdef SLAPD_CRYPT
pthread_mutex_t crypt_mutex;
static int
return ( 0 );
}
pthread_mutex_unlock( &crypt_mutex );
-#ifdef LDAP_MD5
+#ifdef SLAPD_MD5
} else if ( syntax != SYNTAX_BIN && strncasecmp( "{MD5}",
vals[i]->bv_val, (sizeof("{MD5}") - 1 ) ) == 0 ) {
ldap_MD5_CTX MD5context;
if (strcmp(userpassword, base64digest) == 0) {
return ( 0 );
}
-#endif /* LDAP_MD5 */
-#ifdef LDAP_SHA1
+#endif /* SLAPD_MD5 */
+#ifdef SLAPD_SHA1
} else if ( syntax != SYNTAX_BIN && strncasecmp( "{SHA}",
vals[i]->bv_val, (sizeof("{SHA}") - 1 ) ) == 0 ) {
ldap_SHA1_CTX SHA1context;
if (strcmp(userpassword, base64digest) == 0) {
return ( 0 );
}
-#endif /* LDAP_SHA1 */
+#endif /* SLAPD_SHA1 */
} else {
if ( value_cmp( vals[i], v, syntax, normalize ) == 0 ) {
return( 0 );
return( 1 );
}
-#endif /* LDAP_CRYPT */
+#endif /* SLAPD_CRYPT */
int
ldbm_back_bind(
Attribute *a;
int rc;
char *matched = NULL;
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
char krbname[MAX_K_NAME_SZ + 1];
AUTH_DAT ad;
#endif
goto return_results;
}
-#ifdef LDAP_CRYPT
+#ifdef SLAPD_CRYPT
if ( crypted_value_find( a->a_vals, cred, a->a_syntax, 0, cred ) != 0 )
#else
if ( value_find( a->a_vals, cred, a->a_syntax, 0 ) != 0 )
rc = 0;
break;
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
case LDAP_AUTH_KRBV41:
if ( krbv4_ldap_auth( be, cred, &ad ) != LDAP_SUCCESS ) {
send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS,
#include "portable.h"
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
#include "slap.h"
+
#include "back-ldbm.h"
static int cache_delete_entry_internal();
#include "portable.h"
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "proto-back-ldbm.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "portable.h"
#include <stdio.h>
+
+#include <ac/errno.h>
+#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/param.h>
#include <sys/stat.h>
-#include <errno.h>
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#include "slap.h"
#include "back-ldbm.h"
)
{
Datum data;
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &data, 0, sizeof( data ) );
#endif
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "proto-back-ldbm.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "proto-back-ldbm.h"
Datum key, data;
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &key, 0, sizeof( key ) );
memset( &data, 0, sizeof( data ) );
#endif
ID id;
Datum key, data;
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &key, 0, sizeof( key ) );
memset( &data, 0, sizeof( data ) );
#endif
Datum key;
int rc;
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &key, 0, sizeof( key ) );
#endif
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "proto-back-ldbm.h"
extern Attribute *attr_find();
-#ifdef ACLGROUP
+#ifdef SLAPD_ACLGROUPS
/* return 0 IFF edn is a value in uniqueMember attribute
* of entry with bdn AND that entry has an objectClass
* value of groupOfUniqueNames
#include "portable.h"
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+
#include "slap.h"
#include "back-ldbm.h"
IDList *idl;
char buf[20];
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &key, 0, sizeof( key ) );
memset( &data, 0, sizeof( data ) );
#endif
IDList *idl;
char buf[20];
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &key, 0, sizeof( key ) );
#endif
#include "portable.h"
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+
#include "slap.h"
#include "back-ldbm.h"
Datum key, data;
int len, rc, flags;
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &key, 0, sizeof( key ) );
memset( &data, 0, sizeof( data ) );
#endif
/* XXX - check for writer lock - should also check no reader pending */
assert(pthread_rdwr_wchk_np(&e->e_rdwr));
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &key, 0, sizeof( key ) );
#endif
Datum key, data;
Entry *e;
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &key, 0, sizeof( key ) );
memset( &data, 0, sizeof( data ) );
#endif
#include "portable.h"
#include <stdio.h>
+
#include <ac/string.h>
+#include <ac/socket.h>
-#include <sys/types.h>
-#ifdef CLDAP
-#include <sys/socket.h>
-#endif
#include "slap.h"
#include "ldapconfig.h"
#include "back-ldbm.h"
char *kstr;
int i, nids;
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &k2, 0, sizeof( k2 ) );
memset( &data, 0, sizeof( data ) );
#endif
char *kstr;
int i, nids;
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &k2, 0, sizeof( k2 ) );
memset( &data, 0, sizeof( data ) );
#endif
Datum data;
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &data, 0, sizeof( data ) );
#endif
char *kstr;
Datum k2;
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &k2, 0, sizeof( k2 ) );
#endif
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "back-ldbm.h"
char *realval, *tmpval;
char buf[BUFSIZ];
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &key, 0, sizeof( key ) );
#endif
char *realval, *tmpval, *s;
char buf[BUFSIZ];
-#ifdef LDBM_USE_DB2
+#ifdef HAVE_BERKELEY_DB2
memset( &key, 0, sizeof( key ) );
#endif
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "back-ldbm.h"
char *argv[ 4 ];
int i;
-#ifdef LDAP_CRYPT
+#ifdef SLAPD_CRYPT
extern pthread_mutex_t crypt_mutex;
-#endif /* LDAP_CRYPT */
+#endif /* SLAPD_CRYPT */
/* allocate backend-specific stuff */
li = (struct ldbminfo *) ch_calloc( 1, sizeof(struct ldbminfo) );
pthread_mutex_init( &li->li_cache.c_mutex, pthread_mutexattr_default );
pthread_mutex_init( &li->li_nextid_mutex, pthread_mutexattr_default );
pthread_mutex_init( &li->li_dbcache_mutex, pthread_mutexattr_default );
-#ifdef LDAP_CRYPT
+#ifdef SLAPD_CRYPT
pthread_mutex_init( &crypt_mutex, pthread_mutexattr_default );
-#endif /* LDAP_CRYPT */
+#endif /* SLAPD_CRYPT */
pthread_cond_init( &li->li_dbcache_cv, pthread_condattr_default );
for ( i = 0; i < MAXDBCACHE; i++ ) {
pthread_mutex_init( &li->li_dbcache[i].dbc_mutex,
#include "portable.h"
+#ifdef HAVE_KERBEROS
+
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/krb.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "back-ldbm.h"
-#ifdef KERBEROS
-#ifdef KERBEROS_V
-#include <kerberosIV/krb.h>
-#else
-#include <krb.h>
-#endif /* KERBEROS_V */
-
#define LDAP_KRB_PRINCIPAL "ldapserver"
extern char *ldap_srvtab;
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "proto-back-ldbm.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "proto-back-ldbm.h"
#include "portable.h"
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
+
#include "slap.h"
#include "back-ldbm.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "proto-back-ldbm.h"
#include "portable.h"
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+
#include "slap.h"
int
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include "portable.h"
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
#include "slap.h"
passwd_back_config(
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
#include <pwd.h>
-#include "portable.h"
+
#include "slap.h"
extern time_t currenttime;
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
#include <signal.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "shell.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "shell.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "shell.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "shell.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "shell.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "shell.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
forkandexec(
#include "portable.h"
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+
#include "slap.h"
#include "shell.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "shell.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "shell.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "shell.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "shell.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "shell.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include <sys/stat.h>
+
#include "slap.h"
-#ifdef LDAP_LDBM
+#ifdef SLAPD_LDBM
extern int ldbm_back_bind();
extern int ldbm_back_unbind();
extern int ldbm_back_search();
extern int ldbm_back_group();
#endif
-#ifdef LDAP_PASSWD
+#ifdef SLAPD_PASSWD
extern int passwd_back_search();
extern int passwd_back_config();
#endif
-#ifdef LDAP_SHELL
+#ifdef SLAPD_SHELL
extern int shell_back_bind();
extern int shell_back_unbind();
extern int shell_back_search();
be->be_timelimit = deftime;
foundit = 0;
-#ifdef LDAP_LDBM
+#ifdef SLAPD_LDBM
if ( strcasecmp( type, "ldbm" ) == 0 ) {
be->be_bind = ldbm_back_bind;
be->be_unbind = ldbm_back_unbind;
be->be_config = ldbm_back_config;
be->be_init = ldbm_back_init;
be->be_close = ldbm_back_close;
-#ifdef ACLGROUP
+#ifdef SLAPD_ACLGROUPS
be->be_group = ldbm_back_group;
#endif
be->be_type = "ldbm";
}
#endif
-#ifdef LDAP_PASSWD
+#ifdef SLAPD_PASSWD
if ( strcasecmp( type, "passwd" ) == 0 ) {
be->be_bind = NULL;
be->be_unbind = NULL;
be->be_config = passwd_back_config;
be->be_init = NULL;
be->be_close = NULL;
-#ifdef ACLGROUP
+#ifdef SLAPD_ACLGROUPS
be->be_group = NULL;
#endif
be->be_type = "passwd";
}
#endif
-#ifdef LDAP_SHELL
+#ifdef SLAPD_SHELL
if ( strcasecmp( type, "shell" ) == 0 ) {
be->be_bind = shell_back_bind;
be->be_unbind = shell_back_unbind;
be->be_config = shell_back_config;
be->be_init = shell_back_init;
be->be_close = NULL;
-#ifdef ACLGROUP
+#ifdef SLAPD_ACLGROUPS
be->be_group = NULL;
#endif
be->be_type = "shell";
}
}
-#ifdef ACLGROUP
+#ifdef SLAPD_ACLGROUPS
int
be_group(Backend *be, char *bdn, char *edn)
{
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
extern Backend *select_backend();
* }
*/
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
/*
* in version 3.0 there is an extra SEQUENCE tag after the
* BindRequest SEQUENCE tag.
"decoding error" );
return;
}
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( conn->c_version == 30 ) {
switch ( method ) {
case LDAP_AUTH_SIMPLE_30:
method = LDAP_AUTH_SIMPLE;
break;
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
case LDAP_AUTH_KRBV41_30:
method = LDAP_AUTH_KRBV41;
break;
#include "portable.h"
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
char *
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
void
#include "portable.h"
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+
#include "slap.h"
extern Backend *select_backend();
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "ldapconfig.h"
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "ldapconfig.h"
#include "portable.h"
#include <stdio.h>
+
+#include <ac/errno.h>
+#include <ac/signal.h>
+#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <errno.h>
-#include <signal.h>
+
#include "slap.h"
extern Operation *op_add();
extern pthread_mutex_t ops_mutex;
extern pthread_t listener_tid;
-#ifdef DECL_SYS_ERRLIST
-extern int sys_nerr;
-extern char *sys_errlist[];
-#endif
-
struct co_arg {
Connection *co_conn;
Operation *co_op;
do_bind( arg->co_conn, arg->co_op );
break;
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_REQ_UNBIND_30:
#endif
case LDAP_REQ_UNBIND:
do_add( arg->co_conn, arg->co_op );
break;
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_REQ_DELETE_30:
#endif
case LDAP_REQ_DELETE:
do_search( arg->co_conn, arg->co_op );
break;
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_REQ_ABANDON_30:
#endif
case LDAP_REQ_ABANDON:
return;
}
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( conn->c_version == 30 ) {
(void) ber_skip_tag( ber, &len );
}
pthread_attr_init( &attr );
pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED );
-#ifndef THREAD_MIT_PTHREADS
+#if !defined(HAVE_PTHREADS_D4) && !defined(HAVE_DCE)
/* POSIX_THREADS or compatible
* This is a draft 10 or standard pthreads implementation
*/
active_threads++;
pthread_mutex_unlock( &active_threads_mutex );
}
-#else /* !THREAD_MIT_PTHREAD */
+#else /* pthread draft4 */
/*
* This is a draft 4 or earlier pthreads implementation
*/
active_threads++;
pthread_mutex_unlock( &active_threads_mutex );
}
-#endif /* !THREAD_MIT_PTHREAD */
+#endif /* pthread draft4 */
pthread_attr_destroy( &attr );
}
#include "portable.h"
#include <stdio.h>
+
+#include <ac/ctype.h>
+#include <ac/errno.h>
+#include <ac/signal.h>
+#include <ac/socket.h>
#include <ac/string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <errno.h>
#include <ac/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <signal.h>
-#ifdef _AIX
-#include <sys/select.h>
-#endif
+#include <ac/unistd.h>
+
#include "slap.h"
#include "ldapconfig.h"
-#ifdef NEED_FILIO
+
+#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h>
-#else /* NEED_FILIO */
+#elif HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
-#endif /* NEED_FILIO */
-#ifdef USE_SYSCONF
-#include <unistd.h>
-#endif /* USE_SYSCONF */
+#endif
-#ifdef TCP_WRAPPERS
+#ifdef HAVE_TCPD
#include <tcpd.h>
int allow_severity = LOG_INFO;
int deny_severity = LOG_NOTICE;
-#endif /* TCP_WRAPPERS */
+#endif /* TCP Wrappers */
extern Operation *op_add();
-#ifdef DECL_SYS_ERRLIST
-extern int sys_nerr;
-extern char *sys_errlist[];
-#endif
-
extern time_t currenttime;
extern pthread_mutex_t currenttime_mutex;
extern int active_threads;
FILE *fp;
int on = 1;
-#ifdef USE_SYSCONF
+#ifdef HAVE_SYSCONF
dtblsize = sysconf( _SC_OPEN_MAX );
-#else /* USE_SYSCONF */
+#elif HAVE_GETDTABLESIZE
dtblsize = getdtablesize();
-#endif /* USE_SYSCONF */
- /*
- * Add greg@greg.rim.or.jp
- */
+#else
+ dtblsize = FD_SETSIZE
+#endif
+
#ifdef FD_SETSIZE
if(dtblsize > FD_SETSIZE) {
dtblsize = FD_SETSIZE;
}
(void) SIGNAL( SIGPIPE, SIG_IGN );
-#ifdef linux
+#ifdef HAVE_LINUX_THREADS
/*
* LinuxThreads are implemented using SIGUSR1/USR2,
* so we'll use SIGSTKFLT and SIGUNUSED
*/
(void) SIGNAL( SIGSTKFLT, (void *) do_nothing );
(void) SIGNAL( SIGUNUSED, (void *) set_shutdown );
-#else /* !linux */
+#else /* !linux */
(void) SIGNAL( SIGUSR1, (void *) do_nothing );
(void) SIGNAL( SIGUSR2, (void *) set_shutdown );
#endif /* !linux */
char *s;
client_addr = inet_ntoa( from.sin_addr );
-#if defined(REVERSE_LOOKUP) || defined(TCP_WRAPPERS)
+#if defined(SLAPD_RLOOKUPS) || defined(HAVE_TCPD)
hp = gethostbyaddr( (char *)
&(from.sin_addr.s_addr),
sizeof(from.sin_addr.s_addr), AF_INET );
client_addr = NULL;
}
-#ifdef TCP_WRAPPERS
+#ifdef HAVE_TCPD
if(!hosts_ctl("slapd", client_name, client_addr,
STRING_UNKNOWN))
{
pthread_mutex_unlock( &new_conn_mutex );
continue;
}
-#endif /* TCP_WRAPPERS */
+#endif /* HAVE_TCPD */
Statslog( LDAP_DEBUG_STATS,
"conn=%d fd=%d connection from %s (%s) accepted.\n",
{
Debug( LDAP_DEBUG_ANY, "slapd got shutdown signal\n", 0, 0, 0 );
slapd_shutdown = 1;
-#ifdef linux
+#ifdef HAVE_LINUX_THREADS
/*
* LinuxThreads are implemented using SIGUSR1/USR2,
* so we'll use SIGSTKFLT and SIGUNUSED
do_nothing()
{
Debug( LDAP_DEBUG_TRACE, "slapd got do_nothing signal\n", 0, 0, 0 );
-#ifdef linux
+#ifdef HAVE_LINUX_THREADS
/*
* LinuxThreads are implemented using SIGUSR1/USR2,
* so we'll use SIGSTKFLT and SIGUNUSED
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
extern Backend *select_backend();
#include "portable.h"
#include <stdio.h>
-#include <sys/types.h>
-#ifdef SVR4
+
+#include <ac/signal.h>
+#include <ac/unistd.h>
+
#include <sys/stat.h>
-#endif /* svr4 */
#include <fcntl.h>
#include <sys/file.h>
#include <sys/ioctl.h>
-#include <signal.h>
-#include "portable.h"
-
-#ifdef USE_SYSCONF
-#include <unistd.h>
-#endif /* USE_SYSCONF */
-
detach()
{
extern int ldap_debug;
#endif
-#ifdef USE_SYSCONF
+#ifdef HAVE_SYSCONF
nbits = sysconf( _SC_OPEN_MAX );
-#else /* USE_SYSCONF */
+#elif HAVE_GETDTABLESIZE
nbits = getdtablesize();
-#endif /* USE_SYSCONF */
+#else
+ nbits = FD_SETSIZE
+#endif
#ifdef FD_SETSIZE
if ( nbits > FD_SETSIZE ) {
if ( ldap_debug == 0 ) {
#endif
for ( i = 0; i < 5; i++ ) {
-#if defined( sunos5 ) && defined( THREAD_SUNOS5_LWP )
+#if defined( HAVE_LWP_THR )
switch ( fork1() ) {
#else
switch ( fork() ) {
(void) dup2( sd, 2 );
close( sd );
-#ifdef USE_SETSID
+#ifdef HAVE_SETSID
setsid();
-#else /* USE_SETSID */
+#else /* HAVE_SETSID */
if ( (sd = open( "/dev/tty", O_RDWR )) != -1 ) {
(void) ioctl( sd, TIOCNOTTY, NULL );
(void) close( sd );
}
-#endif /* USE_SETSID */
+#endif /* HAVE_SETSID */
#ifdef LDAP_DEBUG
}
#endif
#include "portable.h"
#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
#include "slap.h"
static char **dn_explode();
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
void entry_free();
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
static int get_filter_list();
err = 0;
*fstr = NULL;
f->f_choice = ber_peek_tag( ber, &len );
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( conn->c_version == 30 ) {
switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
Debug( LDAP_DEBUG_FILTER, "begin get_filter_list\n", 0, 0, 0 );
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( conn->c_version == 30 ) {
(void) ber_skip_tag( ber, &len );
}
Debug( LDAP_DEBUG_FILTER, "begin get_substring_filter\n", 0, 0, 0 );
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( conn->c_version == 30 ) {
(void) ber_skip_tag( ber, &len );
}
sprintf( *fstr, "(%s=", f->f_sub_type );
for ( tag = ber_first_element( ber, &len, &last ); tag != LBER_DEFAULT;
tag = ber_next_element( ber, &len, last ) ) {
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( conn->c_version == 30 ) {
rc = ber_scanf( ber, "{a}", &val );
} else
value_normalize( val, syntax );
switch ( tag ) {
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_SUBSTRING_INITIAL_30:
#endif
case LDAP_SUBSTRING_INITIAL:
strcat( *fstr, val );
break;
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_SUBSTRING_ANY_30:
#endif
case LDAP_SUBSTRING_ANY:
strcat( *fstr, val );
break;
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_SUBSTRING_FINAL_30:
#endif
case LDAP_SUBSTRING_FINAL:
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <regex.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/regex.h>
+
#include "slap.h"
extern Attribute *attr_find();
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
#include "portable.h"
#include "slap.h"
#include "portable.h"
#include <stdio.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include "portable.h"
-#ifdef USE_LOCKF
-#include <unistd.h>
-#endif
+
+#include <ac/socket.h>
+#include <ac/time.h>
+#include <ac/unistd.h>
+
#include <sys/file.h>
#include <sys/param.h>
-#include <sys/socket.h>
#include "slap.h"
FILE *
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include "portable.h"
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
#include "slap.h"
#include "ldapconfig.h"
pthread_attr_init( &attr );
pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED );
-#ifndef THREAD_MIT_PTHREADS
+#if !defined(HAVE_PTHREADS_D4) && !defined(HAVE_DCE)
/* POSIX_THREADS or compatible
* This is a draft 10 or standard pthreads implementation
*/
"listener pthread_create failed\n", 0, 0, 0 );
exit( 1 );
}
-#else /* !THREAD_MIT_PTHREADS */
+#else /* draft4 */
/*
* This is a draft 4 or earlier pthreads implementation
*/
"listener pthread_create failed\n", 0, 0, 0 );
exit( 1 );
}
-#endif /* !THREAD_MIT_PTHREADS */
+#endif /* !draft4 */
pthread_attr_destroy( &attr );
pthread_join( listener_tid, (void *) &status );
pthread_exit( 0 );
#endif
flen = sizeof(from);
if ( getpeername( 0, (struct sockaddr *) &from, &flen ) == 0 ) {
-#ifdef REVERSE_LOOKUP
+#ifdef SLAPD_RLOOKUPS
hp = gethostbyaddr( (char *) &(from.sin_addr.s_addr),
sizeof(from.sin_addr.s_addr), AF_INET );
#else
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
#include "slap.h"
extern Backend *select_backend();
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
extern Backend *select_backend();
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
#include "slap.h"
#include "ldapconfig.h"
val.bv_len = strlen( buf );
attr_merge( e, "nbackends", vals );
-#ifdef THREAD_SUNOS5_LWP
+#ifdef HAVE_LWP_THR
sprintf( buf, "%d", thr_getconcurrency() );
val.bv_val = buf;
val.bv_len = strlen( buf );
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
extern time_t currenttime;
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include "portable.h"
+
+#include <ac/ctype.h>
+#include <ac/string.h>
+#include <ac/socket.h>
+#include <ac/time.h>
+
#include "slap.h"
-#if !defined(METAPHONE) && !defined(SOUNDEX)
+#if !defined(METAPHONE) && !defined(SLAPD_PHONETIC)
#define METAPHONE
#endif
#define MAXPHONEMELEN 4
#endif
-#if defined(SOUNDEX)
+#if defined(SLAPD_PHONETIC)
/* lifted from isode-8.0 */
char *
}
#endif /* metaphone */
-#endif /* soundex */
+#endif /* SLAPD_PHONETIC */
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include <sys/file.h>
-#include <sys/socket.h>
+
#include "slap.h"
extern pthread_mutex_t replog_mutex;
#include "portable.h"
#include <stdio.h>
+
+#include <ac/errno.h>
+#include <ac/signal.h>
+#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <errno.h>
-#include <signal.h>
-#include "slap.h"
-#ifdef DECL_SYS_ERRLIST
-extern int sys_nerr;
-extern char *sys_errlist[];
-#endif
+#include "slap.h"
extern int active_threads;
extern pthread_mutex_t active_threads_mutex;
break;
}
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( (ber = ber_alloc_t( conn->c_version == 30 ? 0 : LBER_USE_DER ))
== NULLBER ) {
#else
return;
}
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( op->o_cldap ) {
rc = ber_printf( ber, "{is{t{ess}}}", op->o_msgid, "", tag,
err, matched ? matched : "", text ? text : "" );
} else
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( conn->c_version == 30 ) {
rc = ber_printf( ber, "{it{{ess}}}", op->o_msgid, tag, err,
matched ? matched : "", text ? text : "" );
active_threads--;
conn->c_writewaiter = 1;
-#ifdef linux
+#ifdef HAVE_LINUX_THREADS
pthread_kill( listener_tid, SIGSTKFLT );
#else /* !linux */
pthread_kill( listener_tid, SIGUSR1 );
char *text
)
{
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( op->o_cldap ) {
SAFEMEMCPY( (char *)conn->c_sb.sb_useaddr, &op->o_clientaddr,
sizeof( struct sockaddr ));
edn = dn_normalize_case( strdup( e->e_dn ) );
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( (ber = ber_alloc_t( conn->c_version == 30 ? 0 : LBER_USE_DER ))
== NULLBER )
#else
goto error_return;
}
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( conn->c_version == 30 ) {
rc = ber_printf( ber, "{it{{s{", op->o_msgid,
LDAP_RES_SEARCH_ENTRY, e->e_dn );
free(edn);
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( conn->c_version == 30 ) {
rc = ber_printf( ber, "}}}}" );
} else
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
extern Attribute *attr_find();
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
extern char **str2charray();
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
#include "ldapconfig.h"
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
+BUILD_OPT = "--enable-shell"
+BUILD_SRV = @BUILD_SHELL@
+
+all-local: $(PROGRAMS)
+
passwd-shell: pwd-version.o
$(CC) $(LDFLAGS) -o $@ $(OBJS) pwd-version.o $(LIBS)
#include "portable.h"
-#include <sys/types.h>
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
#include <pwd.h>
-#include <varargs.h>
+
+#include <ac/string.h>
+
#include <lber.h>
#include <ldap.h>
+
#include "shellutil.h"
#include "passwd-shell.h"
-#ifdef LDAP_DEBUG
-void debug_printf();
-#else /* LDAP_DEBUG */
-#define debug_printf()
-#endif /* LDAP_DEBUG */
-
-
-static void pwdfile_search( struct ldop *op, FILE *ofp );
-static struct ldentry *pw2entry( struct ldop *op, struct passwd *pw );
+static void pwdfile_search LDAP_P(( struct ldop *op, FILE *ofp ));
+static struct ldentry *pw2entry LDAP_P(( struct ldop *op, struct passwd *pw ));
static char tmpbuf[ MAXLINELEN * 2 ];
#include "portable.h"
-#include <sys/types.h>
#include <stdio.h>
-#include <string.h>
+
+#ifdef STDC_HEADERS
#include <stdlib.h>
-#include <pwd.h>
+#include <stdarg.h>
+#else
#include <varargs.h>
+#endif
+
+#include <pwd.h>
+
+#include <ac/string.h>
+
#include <lber.h>
#include <ldap.h>
#include "shellutil.h"
/* VARARGS */
void
-debug_printf( va_alist /* char *fmt, args... */ )
+debug_printf
+#ifdef STDC_HEADERS
+ ( char *fmt, ... )
+#else
+ ( va_alist )
va_dcl
+#endif
{
- char *fmt;
va_list ap;
-
- if ( debugflg ) {
- va_start( ap );
- fmt = va_arg( ap, char * );
- fprintf( stderr, "%s: ", progname );
- vfprintf( stderr, fmt, ap );
- va_end( ap );
- }
+#ifndef STDC_HEADERS
+ char *fmt;
+#endif
+
+ if ( debugflg ) {
+#ifdef STDC_HEADERS
+ va_start( ap, fmt );
+#else
+ va_start( ap );
+ fmt = va_arg( ap, char * );
+#endif
+ fprintf( stderr, "%s: ", progname );
+ vfprintf( stderr, fmt, ap );
+ va_end( ap );
+ }
}
#ifdef LDAP_DEBUG
-void debug_printf();
+void debug_printf LDAP_P((char *, ...));
#else /* LDAP_DEBUG */
#define debug_printf()
#endif /* LDAP_DEBUG */
char *a_dnattr;
long a_access;
-#ifdef SLAPD_ACLGROUP
+#ifdef SLAPD_ACLGROUPS
char *a_group;
#endif
IFP be_init; /* backend init routine */
IFP be_close; /* backend close routine */
-#ifdef ACLGROUP
+#ifdef SLAPD_ACLGROUPS
IFP be_group; /* backend group member test */
#endif
} Backend;
#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
#include "slap.h"
static char *find_matching_paren();
#include "portable.h"
-#if defined( ultrix ) || defined( nextstep )
+#ifndef HAVE_STRDUP
-#include <string.h>
+#include <ac/string.h>
char *strdup( char *s )
{
return( p );
}
-#endif /* ultrix || nextstep */
+#endif /* !strdup */
#include "portable.h"
-#if defined( nextstep )
+#ifndef HAVE_TEMPNAME
-#include <string.h>
-
-char *tempnam( char *dir, char *pfx );
+#include <ac/string.h>
char *tempnam( char *dir, char *pfx )
{
#include "portable.h"
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+
#include "slap.h"
extern Backend *select_backend();
/* value.c - routines for dealing with values */
#include "portable.h"
+
#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
#include <sys/stat.h>
-#include "portable.h"
+
#include "slap.h"
int
*d = '\0';
}
-#define MIN( a, b ) (a < b ? a : b )
+#define LDAP_MIN( a, b ) ((a) < (b) ? (a) : (b) )
int
value_cmp(
break;
case SYNTAX_BIN:
- rc = memcmp( v1->bv_val, v2->bv_val, MIN( v1->bv_len,
+ rc = memcmp( v1->bv_val, v2->bv_val, LDAP_MIN( v1->bv_len,
v2->bv_len ) );
break;
}