]> git.sur5r.net Git - openldap/commitdiff
Fix portability issue.
authorKurt Zeilenga <kurt@openldap.org>
Thu, 21 Sep 2000 19:12:41 +0000 (19:12 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 21 Sep 2000 19:12:41 +0000 (19:12 +0000)
Move prototypes to proto-slap.h

servers/slapd/proto-slap.h
servers/slapd/saslauthz.c

index ca1a3e49b428e5bcd2bf20b1f43a8ea1cbc3955f..c8b8ea2e341e64777a9154a4ea25d696bde1d736 100644 (file)
@@ -784,6 +784,9 @@ LDAP_SLAPD_F (int)          ldap_syslog;
 LDAP_SLAPD_F (char *)  default_search_base;
 LDAP_SLAPD_F (char *)  default_search_nbase;
 
+LDAP_SLAPD_F (int)             nSaslRegexp;
+LDAP_SLAPD_F (SaslRegexp_t*) SaslRegexp;
+
 LDAP_SLAPD_F (ldap_pvt_thread_mutex_t) num_sent_mutex;
 LDAP_SLAPD_F (long)            num_bytes_sent;
 LDAP_SLAPD_F (long)            num_pdu_sent;
index f762f20289cb3eccd1be9736bdb5ebc5da958798..1caa446ff7533399664f4a0f8f457ba7075debb7 100644 (file)
 #include <ac/stdlib.h>
 #include <stdio.h>
 
-#define SLAPD_TOOLS
 #include "slap.h"
-#undef SLAPD_TOOLS
 #include "proto-slap.h"
 
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#elif defined (HAVE_STRING_H)
-#include <string.h>
-#endif
+#include <ac/string.h>
 
 #ifdef HAVE_CYRUS_SASL
 #include <limits.h>
 #include <sasl.h>
 #include <ldap_pvt.h>
-
-extern int nSaslRegexp;
-extern SaslRegexp_t *SaslRegexp;
 #endif
 
 
@@ -198,7 +189,7 @@ char *slap_sasl_regexp( char *saslname )
        /* Match the normalized SASL name to the saslregexp patterns */
        for( reg = SaslRegexp,i=0;  i<nSaslRegexp;  i++,reg++ ) {
                if ( regexec( &reg->workspace, saslname, SASLREGEX_REPLACE,
-                 reg->strings, 0)  == REG_OK )
+                 reg->strings, 0)  == 0 )
                        break;
        }