static FILE *logfile;
static char *logfileName;
+lload_features_t lload_features;
+
ber_len_t sockbuf_max_incoming = SLAP_SB_MAX_INCOMING_DEFAULT;
ber_len_t sockbuf_max_incoming_auth = SLAP_SB_MAX_INCOMING_AUTH;
static ConfigDriver config_restrict;
static ConfigDriver config_loglevel;
static ConfigDriver config_include;
+static ConfigDriver config_feature;
#ifdef HAVE_TLS
static ConfigDriver config_tls_option;
static ConfigDriver config_tls_config;
ARG_INT|ARG_MAGIC|CFG_RESCOUNT,
&config_generic,
},
+ { "feature", "name", 2, 0, 0,
+ ARG_MAGIC,
+ &config_feature,
+ },
{ "TLSCACertificate", NULL, 2, 2, 0,
#ifdef HAVE_TLS
CFG_TLS_CACERT|ARG_BINARY|ARG_MAGIC,
return rc;
}
+static int
+config_feature( ConfigArgs *c )
+{
+ slap_verbmasks features[] = {
+ { BER_BVC("vc"), LLOAD_FEATURE_VC },
+ { BER_BVC("proxyauthz"), LLOAD_FEATURE_PROXYAUTHZ },
+ { BER_BVNULL, 0 }
+ };
+ slap_mask_t mask = 0;
+ int i;
+
+ i = verbs_to_mask( c->argc, c->argv, features, &mask );
+ if ( i ) {
+ Debug( LDAP_DEBUG_ANY, "%s: <%s> unknown feature %s\n", c->log,
+ c->argv[0], c->argv[i] );
+ return 1;
+ }
+ lload_features |= mask;
+ return 0;
+}
+
#ifdef HAVE_TLS
static int
config_tls_cleanup( ConfigArgs *c )
typedef struct Listener Listener;
+typedef enum {
+ LLOAD_FEATURE_VC = 1 << 0,
+ LLOAD_FEATURE_PROXYAUTHZ = 1 << 1,
+} lload_features_t;
+
enum lload_tls_type {
LLOAD_CLEARTEXT = 0,
LLOAD_LDAPS,
struct event *c_read_event, *c_write_event;
/* can only be changed by binding thread */
- int c_features;
-#define SLAP_C_VC 1
-
struct berval c_sasl_bind_mech; /* mech in progress */
struct berval c_auth; /* authcDN (possibly in progress) */
+#ifdef LDAP_API_FEATURE_VERIFY_CREDENTIALS
struct berval c_vc_cookie;
+#endif /* LDAP_API_FEATURE_VERIFY_CREDENTIALS */
/* Can be held while acquiring c_mutex to inject things into c_ops or
* destroy the connection */