bconfig.c 210 KB
Newer Older
Howard Chu's avatar
Howard Chu committed
1
2
3
4
/* bconfig.c - the config backend */
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
 *
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
5
 * Copyright 2005-2021 The OpenLDAP Foundation.
Howard Chu's avatar
Howard Chu committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted only as authorized by the OpenLDAP
 * Public License.
 *
 * A copy of this license is available in the file LICENSE in the
 * top-level directory of the distribution or, alternatively, at
 * <http://www.OpenLDAP.org/license.html>.
 */
/* ACKNOWLEDGEMENTS:
 * This work was originally developed by Howard Chu for inclusion
 * in OpenLDAP Software.
 */

#include "portable.h"

#include <stdio.h>
#include <ac/string.h>
25
#include <ac/ctype.h>
26
#include <ac/dirent.h>
27
#include <ac/errno.h>
28
#include <sys/stat.h>
Howard Chu's avatar
Howard Chu committed
29
#include <ac/unistd.h>
Howard Chu's avatar
Howard Chu committed
30
31

#include "slap.h"
32
33
34
35
36

#ifdef LDAP_SLAPI
#include "slapi/slapi.h"
#endif

37
#include <ldif.h>
38
39
#include <lutil.h>

40
#include "slap-config.h"
Howard Chu's avatar
Howard Chu committed
41

42
43
44
45
46
#define	CONFIG_RDN	"cn=config"
#define	SCHEMA_RDN	"cn=schema"

static struct berval config_rdn = BER_BVC(CONFIG_RDN);
static struct berval schema_rdn = BER_BVC(SCHEMA_RDN);
Howard Chu's avatar
Howard Chu committed
47

48
49
extern int slap_DN_strict;	/* dn.c */

50
51
52
53
54
55
#ifdef SLAPD_MODULES
typedef struct modpath_s {
	struct modpath_s *mp_next;
	struct berval mp_path;
	BerVarray mp_loads;
} ModPaths;
Howard Chu's avatar
Howard Chu committed
56
57

static ModPaths modpaths, *modlast = &modpaths, *modcur = &modpaths;
58
59
60
61
62
63
#endif

typedef struct ConfigFile {
	struct ConfigFile *c_sibs;
	struct ConfigFile *c_kids;
	struct berval c_file;
Howard Chu's avatar
Howard Chu committed
64
65
66
67
	AttributeType *c_at_head, *c_at_tail;
	ContentRule *c_cr_head, *c_cr_tail;
	ObjectClass *c_oc_head, *c_oc_tail;
	OidMacro *c_om_head, *c_om_tail;
68
	Syntax *c_syn_head, *c_syn_tail;
69
70
71
	BerVarray c_dseFiles;
} ConfigFile;

Howard Chu's avatar
Howard Chu committed
72
73
74
typedef struct {
	ConfigFile *cb_config;
	CfEntryInfo *cb_root;
75
76
	BackendDB	cb_db;	/* underlying database */
	int		cb_got_ldif;
77
	int		cb_use_ldif;
Howard Chu's avatar
Howard Chu committed
78
79
} CfBackInfo;

80
81
static CfBackInfo cfBackInfo;

82
static char	*passwd_salt;
Howard Chu's avatar
Howard Chu committed
83
static FILE *logfile;
84
static char	*logfileName;
Ralf Haferkamp's avatar
Ralf Haferkamp committed
85
static AccessControl *defacl_parsed = NULL;
86

87
88
static struct berval cfdir;

89
/* Private state */
Howard Chu's avatar
Howard Chu committed
90
static AttributeDescription *cfAd_backend, *cfAd_database, *cfAd_overlay,
91
	*cfAd_include, *cfAd_attr, *cfAd_oc, *cfAd_om, *cfAd_syntax;
Howard Chu's avatar
Howard Chu committed
92

93
static ConfigFile *cfn;
94

95
96
static Avlnode *CfOcTree;

97
98
99
100
/* System schema state */
extern AttributeType *at_sys_tail;	/* at.c */
extern ObjectClass *oc_sys_tail;	/* oc.c */
extern OidMacro *om_sys_tail;	/* oidm.c */
101
extern Syntax *syn_sys_tail;	/* syntax.c */
102
103
104
static AttributeType *cf_at_tail;
static ObjectClass *cf_oc_tail;
static OidMacro *cf_om_tail;
105
static Syntax *cf_syn_tail;
106

107
static int config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca,
108
	SlapReply *rs, int *renumber, Operation *op );
109

110
static int config_check_schema( Operation *op, CfBackInfo *cfb );
111

Howard Chu's avatar
Howard Chu committed
112
static ConfigDriver config_fname;
113
static ConfigDriver config_cfdir;
Howard Chu's avatar
Howard Chu committed
114
115
116
117
118
119
120
static ConfigDriver config_generic;
static ConfigDriver config_search_base;
static ConfigDriver config_passwd_hash;
static ConfigDriver config_schema_dn;
static ConfigDriver config_sizelimit;
static ConfigDriver config_timelimit;
static ConfigDriver config_overlay;
121
static ConfigDriver config_subordinate; 
Howard Chu's avatar
Howard Chu committed
122
static ConfigDriver config_suffix; 
123
124
125
#ifdef LDAP_TCP_BUFFER
static ConfigDriver config_tcp_buffer; 
#endif /* LDAP_TCP_BUFFER */
Howard Chu's avatar
Howard Chu committed
126
127
128
129
130
131
132
133
134
135
136
static ConfigDriver config_rootdn;
static ConfigDriver config_rootpw;
static ConfigDriver config_restrict;
static ConfigDriver config_allows;
static ConfigDriver config_disallows;
static ConfigDriver config_requires;
static ConfigDriver config_security;
static ConfigDriver config_referral;
static ConfigDriver config_loglevel;
static ConfigDriver config_updatedn;
static ConfigDriver config_updateref;
137
static ConfigDriver config_extra_attrs;
Howard Chu's avatar
Howard Chu committed
138
static ConfigDriver config_include;
Howard Chu's avatar
Howard Chu committed
139
static ConfigDriver config_obsolete;
140
#ifdef HAVE_TLS
Howard Chu's avatar
Howard Chu committed
141
142
static ConfigDriver config_tls_option;
static ConfigDriver config_tls_config;
143
#endif
144
extern ConfigDriver syncrepl_config;
145
146
147
148
149
150
151

enum {
	CFG_ACL = 1,
	CFG_BACKEND,
	CFG_DATABASE,
	CFG_TLS_RAND,
	CFG_TLS_CIPHER,
152
	CFG_TLS_PROTOCOL_MIN,
153
154
155
156
	CFG_TLS_CERT_FILE,
	CFG_TLS_CERT_KEY,
	CFG_TLS_CA_PATH,
	CFG_TLS_CA_FILE,
157
	CFG_TLS_DH_FILE,
158
159
	CFG_TLS_VERIFY,
	CFG_TLS_CRLCHECK,
Howard Chu's avatar
Howard Chu committed
160
	CFG_TLS_CRL_FILE,
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
	CFG_CONCUR,
	CFG_THREADS,
	CFG_SALT,
	CFG_LIMITS,
	CFG_RO,
	CFG_REWRITE,
	CFG_DEPTH,
	CFG_OID,
	CFG_OC,
	CFG_DIT,
	CFG_ATTR,
	CFG_ATOPT,
	CFG_ROOTDSE,
	CFG_LOGFILE,
	CFG_PLUGIN,
	CFG_MODLOAD,
	CFG_MODPATH,
	CFG_LASTMOD,
179
	CFG_LASTBIND,
180
181
	CFG_AZPOLICY,
	CFG_AZREGEXP,
182
183
	CFG_AZDUC,
	CFG_AZDUC_IGNORE,
184
185
186
	CFG_SASLSECP,
	CFG_SSTR_IF_MAX,
	CFG_SSTR_IF_MIN,
187
	CFG_TTHREADS,
188
	CFG_MULTIPROVIDER,
189
	CFG_HIDDEN,
190
	CFG_MONITORING,
191
	CFG_SERVERID,
Howard Chu's avatar
Howard Chu committed
192
	CFG_SORTVALS,
193
	CFG_IX_INTLEN,
194
	CFG_SYNTAX,
195
	CFG_ACL_ADD,
196
	CFG_SYNC_SUBENTRY,
197
	CFG_LTHREADS,
198
	CFG_IX_HASH64,
199
	CFG_DISABLED,
Howard Chu's avatar
Howard Chu committed
200
	CFG_THREADQS,
201
	CFG_TLS_ECNAME,
202
203
204
	CFG_TLS_CACERT,
	CFG_TLS_CERT,
	CFG_TLS_KEY,
Pierangelo Masarati's avatar
Pierangelo Masarati committed
205
206

	CFG_LAST
207
208
209
210
211
212
213
};

typedef struct {
	char *name, *oid;
} OidRec;

static OidRec OidMacros[] = {
214
215
	/* OpenLDAProot:1.12.2 */
	{ "OLcfg", "1.3.6.1.4.1.4203.1.12.2" },
216
	{ "OLcfgAt", "OLcfg:3" },
217
218
219
220
	{ "OLcfgGlAt", "OLcfgAt:0" },
	{ "OLcfgBkAt", "OLcfgAt:1" },
	{ "OLcfgDbAt", "OLcfgAt:2" },
	{ "OLcfgOvAt", "OLcfgAt:3" },
221
	{ "OLcfgCtAt", "OLcfgAt:4" },	/* contrib modules */
222
	{ "OLcfgOc", "OLcfg:4" },
223
224
225
226
	{ "OLcfgGlOc", "OLcfgOc:0" },
	{ "OLcfgBkOc", "OLcfgOc:1" },
	{ "OLcfgDbOc", "OLcfgOc:2" },
	{ "OLcfgOvOc", "OLcfgOc:3" },
227
	{ "OLcfgCtOc", "OLcfgOc:4" },	/* contrib modules */
228
229
230
231
232
233

	/* Syntaxes. We should just start using the standard names and
	 * document that they are predefined and available for users
	 * to reference in their own schema. Defining schema without
	 * OID macros is for masochists...
	 */
234
235
236
237
	{ "OMsyn", "1.3.6.1.4.1.1466.115.121.1" },
	{ "OMsBoolean", "OMsyn:7" },
	{ "OMsDN", "OMsyn:12" },
	{ "OMsDirectoryString", "OMsyn:15" },
Howard Chu's avatar
Howard Chu committed
238
	{ "OMsIA5String", "OMsyn:26" },
239
240
	{ "OMsInteger", "OMsyn:27" },
	{ "OMsOID", "OMsyn:38" },
241
242
243
244
	{ "OMsOctetString", "OMsyn:40" },
	{ NULL, NULL }
};

245
/*
246
247
 * Backend/Database registry
 *
248
 * OLcfg{Bk|Db}{Oc|At}:0		-> common
249
 * OLcfg{Bk|Db}{Oc|At}:1		-> back-bdb(/back-hdb) (removed)
Pierangelo Masarati's avatar
Pierangelo Masarati committed
250
 * OLcfg{Bk|Db}{Oc|At}:2		-> back-ldif
Howard Chu's avatar
Howard Chu committed
251
 * OLcfg{Bk|Db}{Oc|At}:3		-> back-ldap/meta
252
 * OLcfg{Bk|Db}{Oc|At}:4		-> back-monitor
253
 * OLcfg{Bk|Db}{Oc|At}:5		-> back-relay
Howard Chu's avatar
Howard Chu committed
254
 * OLcfg{Bk|Db}{Oc|At}:6		-> back-sql(/back-ndb)
255
 * OLcfg{Bk|Db}{Oc|At}:7		-> back-sock
256
 * OLcfg{Bk|Db}{Oc|At}:8		-> back-null
Howard Chu's avatar
Howard Chu committed
257
 * OLcfg{Bk|Db}{Oc|At}:9		-> back-passwd
Howard Chu's avatar
Howard Chu committed
258
 * OLcfg{Bk|Db}{Oc|At}:10		-> back-shell
Howard Chu's avatar
Howard Chu committed
259
 * OLcfg{Bk|Db}{Oc|At}:11		-> back-perl
260
 * OLcfg{Bk|Db}{Oc|At}:12		-> back-mdb
Ondřej Kuzník's avatar
Ondřej Kuzník committed
261
 * OLcfg{Bk|Db}{Oc|At}:13		-> lloadd
262
263
 */

264
265
266
267
268
269
270
271
/*
 * Overlay registry
 *
 * OLcfgOv{Oc|At}:1			-> syncprov
 * OLcfgOv{Oc|At}:2			-> pcache
 * OLcfgOv{Oc|At}:3			-> chain
 * OLcfgOv{Oc|At}:4			-> accesslog
 * OLcfgOv{Oc|At}:5			-> valsort
272
273
 * OLcfgOv{Oc|At}:7			-> distproc
 * OLcfgOv{Oc|At}:8			-> dynlist
274
 * OLcfgOv{Oc|At}:9			-> dds
Pierangelo Masarati's avatar
Pierangelo Masarati committed
275
276
277
278
279
280
281
 * OLcfgOv{Oc|At}:10			-> unique
 * OLcfgOv{Oc|At}:11			-> refint
 * OLcfgOv{Oc|At}:12 			-> ppolicy
 * OLcfgOv{Oc|At}:13			-> constraint
 * OLcfgOv{Oc|At}:14			-> translucent
 * OLcfgOv{Oc|At}:15			-> auditlog
 * OLcfgOv{Oc|At}:16			-> rwm
Howard Chu's avatar
Howard Chu committed
282
 * OLcfgOv{Oc|At}:17			-> dyngroup
Pierangelo Masarati's avatar
Pierangelo Masarati committed
283
 * OLcfgOv{Oc|At}:18			-> memberof
284
 * OLcfgOv{Oc|At}:19			-> collect
285
 * OLcfgOv{Oc|At}:20			-> retcode
Howard Chu's avatar
Howard Chu committed
286
 * OLcfgOv{Oc|At}:21			-> sssvlv
287
288
 * OLcfgOv{Oc|At}:22			-> autoca
 * OLcfgOv{Oc|At}:24			-> remoteauth
289
290
 */

291
292
/* alphabetical ordering */

293
static ConfigTable config_back_cf_table[] = {
294
295
	/* This attr is read-only */
	{ "", "", 0, 0, 0, ARG_MAGIC,
296
		&config_fname, "( OLcfgGlAt:78 NAME 'olcConfigFile' "
297
			"DESC 'File for slapd configuration directives' "
298
			"EQUALITY caseExactMatch "
299
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
300
	{ "", "", 0, 0, 0, ARG_MAGIC,
301
		&config_cfdir, "( OLcfgGlAt:79 NAME 'olcConfigDir' "
302
			"DESC 'Directory for slapd configuration backend' "
303
			"EQUALITY caseExactMatch "
304
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
305
	{ "access",	NULL, 0, 0, 0, ARG_MAY_DB|ARG_MAGIC|CFG_ACL,
306
		&config_generic, "( OLcfgGlAt:1 NAME 'olcAccess' "
307
308
309
			"DESC 'Access Control List' "
			"EQUALITY caseIgnoreMatch "
			"SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
310
311
312
	{ "add_content_acl",	NULL, 0, 0, 0, ARG_MAY_DB|ARG_ON_OFF|ARG_MAGIC|CFG_ACL_ADD,
		&config_generic, "( OLcfgGlAt:86 NAME 'olcAddContentAcl' "
			"DESC 'Check ACLs against content of Add ops' "
313
			"EQUALITY booleanMatch "
314
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
315
	{ "allows",	"features", 2, 0, 5, ARG_PRE_DB|ARG_MAGIC,
316
		&config_allows, "( OLcfgGlAt:2 NAME 'olcAllows' "
317
318
319
320
			"DESC 'Allowed set of deprecated features' "
			"EQUALITY caseIgnoreMatch "
			"SYNTAX OMsDirectoryString )", NULL, NULL },
	{ "argsfile", "file", 2, 2, 0, ARG_STRING,
321
		&slapd_args_file, "( OLcfgGlAt:3 NAME 'olcArgsFile' "
322
			"DESC 'File for slapd command line options' "
323
			"EQUALITY caseExactMatch "
324
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
325
326
327
328
	{ "attributeoptions", NULL, 0, 0, 0, ARG_MAGIC|CFG_ATOPT,
		&config_generic, "( OLcfgGlAt:5 NAME 'olcAttributeOptions' "
			"EQUALITY caseIgnoreMatch "
			"SYNTAX OMsDirectoryString )", NULL, NULL },
Pierangelo Masarati's avatar
cleanup    
Pierangelo Masarati committed
329
	{ "attribute",	"attribute", 2, 0, STRLENOF( "attribute" ),
330
		ARG_PAREN|ARG_MAGIC|CFG_ATTR,
331
		&config_generic, "( OLcfgGlAt:4 NAME 'olcAttributeTypes' "
Howard Chu's avatar
Howard Chu committed
332
			"DESC 'OpenLDAP attributeTypes' "
333
			"EQUALITY caseIgnoreMatch "
334
			"SUBSTR caseIgnoreSubstringsMatch "
335
			"SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )",
Howard Chu's avatar
Howard Chu committed
336
				NULL, NULL },
337
	{ "authid-rewrite", "rewrite", 2, 0, STRLENOF( "authid-rewrite" ),
338
		ARG_MAGIC|CFG_REWRITE, &config_generic,
339
		 "( OLcfgGlAt:6 NAME 'olcAuthIDRewrite' "
340
			"EQUALITY caseIgnoreMatch "
341
			"SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
342
	{ "authz-policy", "policy", 2, 2, 0, ARG_STRING|ARG_MAGIC|CFG_AZPOLICY,
343
		&config_generic, "( OLcfgGlAt:7 NAME 'olcAuthzPolicy' "
344
			"EQUALITY caseIgnoreMatch "
345
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
346
	{ "authz-regexp", "regexp> <DN", 3, 3, 0, ARG_MAGIC|CFG_AZREGEXP,
347
		&config_generic, "( OLcfgGlAt:8 NAME 'olcAuthzRegexp' "
348
349
350
			"EQUALITY caseIgnoreMatch "
			"SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
	{ "backend", "type", 2, 2, 0, ARG_PRE_DB|ARG_MAGIC|CFG_BACKEND,
351
		&config_generic, "( OLcfgGlAt:9 NAME 'olcBackend' "
352
353
			"DESC 'A type of backend' "
			"EQUALITY caseIgnoreMatch "
354
355
			"SYNTAX OMsDirectoryString SINGLE-VALUE X-ORDERED 'SIBLINGS' )",
				NULL, NULL },
Howard Chu's avatar
Howard Chu committed
356
	{ "concurrency", "level", 2, 2, 0, ARG_INT|ARG_MAGIC|CFG_CONCUR,
357
		&config_generic, "( OLcfgGlAt:10 NAME 'olcConcurrency' "
358
			"EQUALITY integerMatch "
359
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
360
	{ "conn_max_pending", "max", 2, 2, 0, ARG_INT,
361
		&slap_conn_max_pending, "( OLcfgGlAt:11 NAME 'olcConnMaxPending' "
362
			"EQUALITY integerMatch "
363
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
364
	{ "conn_max_pending_auth", "max", 2, 2, 0, ARG_INT,
365
		&slap_conn_max_pending_auth, "( OLcfgGlAt:12 NAME 'olcConnMaxPendingAuth' "
366
			"EQUALITY integerMatch "
367
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
368
	{ "database", "type", 2, 2, 0, ARG_MAGIC|CFG_DATABASE,
369
		&config_generic, "( OLcfgGlAt:13 NAME 'olcDatabase' "
370
			"DESC 'The backend type for a database instance' "
371
			"SUP olcBackend SINGLE-VALUE X-ORDERED 'SIBLINGS' )", NULL, NULL },
Pierangelo Masarati's avatar
Pierangelo Masarati committed
372
	{ "defaultSearchBase", "dn", 2, 2, 0, ARG_PRE_BI|ARG_PRE_DB|ARG_DN|ARG_QUOTE|ARG_MAGIC,
373
		&config_search_base, "( OLcfgGlAt:14 NAME 'olcDefaultSearchBase' "
374
			"EQUALITY distinguishedNameMatch "
375
			"SYNTAX OMsDN SINGLE-VALUE )", NULL, NULL },
376
377
	{ "disabled", "on|off", 2, 2, 0, ARG_DB|ARG_ON_OFF|ARG_MAGIC|CFG_DISABLED,
		&config_generic, "( OLcfgDbAt:0.21 NAME 'olcDisabled' "
378
			"EQUALITY booleanMatch "
379
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
380
	{ "disallows", "features", 2, 0, 8, ARG_PRE_DB|ARG_MAGIC,
381
		&config_disallows, "( OLcfgGlAt:15 NAME 'olcDisallows' "
382
383
			"EQUALITY caseIgnoreMatch "
			"SYNTAX OMsDirectoryString )", NULL, NULL },
384
	{ "ditcontentrule",	NULL, 0, 0, 0, ARG_MAGIC|CFG_DIT|ARG_NO_DELETE|ARG_NO_INSERT,
385
		&config_generic, "( OLcfgGlAt:16 NAME 'olcDitContentRules' "
Howard Chu's avatar
Howard Chu committed
386
			"DESC 'OpenLDAP DIT content rules' "
387
			"EQUALITY caseIgnoreMatch "
388
			"SUBSTR caseIgnoreSubstringsMatch "
389
			"SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )",
Howard Chu's avatar
Howard Chu committed
390
			NULL, NULL },
391
392
393
394
	{ "extra_attrs", "attrlist", 2, 2, 0, ARG_DB|ARG_MAGIC,
		&config_extra_attrs, "( OLcfgDbAt:0.20 NAME 'olcExtraAttrs' "
			"EQUALITY caseIgnoreMatch "
			"SYNTAX OMsDirectoryString )", NULL, NULL },
395
396
397
398
399
400
	{ "gentlehup", "on|off", 2, 2, 0,
#ifdef SIGHUP
		ARG_ON_OFF, &global_gentlehup,
#else
		ARG_IGNORED, NULL,
#endif
401
		"( OLcfgGlAt:17 NAME 'olcGentleHUP' "
402
			"EQUALITY booleanMatch "
403
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
404
405
	{ "hidden", "on|off", 2, 2, 0, ARG_DB|ARG_ON_OFF|ARG_MAGIC|CFG_HIDDEN,
		&config_generic, "( OLcfgDbAt:0.17 NAME 'olcHidden' "
406
			"EQUALITY booleanMatch "
407
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
408
	{ "idletimeout", "timeout", 2, 2, 0, ARG_INT,
409
		&global_idletimeout, "( OLcfgGlAt:18 NAME 'olcIdleTimeout' "
410
			"EQUALITY integerMatch "
411
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
412
	{ "include", "file", 2, 2, 0, ARG_MAGIC,
413
414
		&config_include, "( OLcfgGlAt:19 NAME 'olcInclude' "
			"SUP labeledURI )", NULL, NULL },
415
416
	{ "index_hash64", "on|off", 2, 2, 0, ARG_ON_OFF|ARG_MAGIC|CFG_IX_HASH64,
		&config_generic, "( OLcfgGlAt:94 NAME 'olcIndexHash64' "
417
			"EQUALITY booleanMatch "
418
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
419
	{ "index_substr_if_minlen", "min", 2, 2, 0, ARG_UINT|ARG_NONZERO|ARG_MAGIC|CFG_SSTR_IF_MIN,
420
		&config_generic, "( OLcfgGlAt:20 NAME 'olcIndexSubstrIfMinLen' "
421
			"EQUALITY integerMatch "
422
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
423
	{ "index_substr_if_maxlen", "max", 2, 2, 0, ARG_UINT|ARG_NONZERO|ARG_MAGIC|CFG_SSTR_IF_MAX,
424
		&config_generic, "( OLcfgGlAt:21 NAME 'olcIndexSubstrIfMaxLen' "
425
			"EQUALITY integerMatch "
426
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
427
	{ "index_substr_any_len", "len", 2, 2, 0, ARG_UINT|ARG_NONZERO,
428
		&index_substr_any_len, "( OLcfgGlAt:22 NAME 'olcIndexSubstrAnyLen' "
429
			"EQUALITY integerMatch "
430
431
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL,
			{ .v_uint = SLAP_INDEX_SUBSTR_ANY_LEN_DEFAULT } },
432
	{ "index_substr_any_step", "step", 2, 2, 0, ARG_UINT|ARG_NONZERO,
433
		&index_substr_any_step, "( OLcfgGlAt:23 NAME 'olcIndexSubstrAnyStep' "
434
			"EQUALITY integerMatch "
435
436
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL,
			{ .v_uint = SLAP_INDEX_SUBSTR_ANY_STEP_DEFAULT } },
437
	{ "index_intlen", "len", 2, 2, 0, ARG_UINT|ARG_MAGIC|CFG_IX_INTLEN,
438
		&config_generic, "( OLcfgGlAt:84 NAME 'olcIndexIntLen' "
439
			"EQUALITY integerMatch "
440
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
441
	{ "lastmod", "on|off", 2, 2, 0, ARG_DB|ARG_ON_OFF|ARG_MAGIC|CFG_LASTMOD,
442
		&config_generic, "( OLcfgDbAt:0.4 NAME 'olcLastMod' "
443
			"EQUALITY booleanMatch "
444
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
445
446
447
448
	{ "lastbind", "on|off", 2, 2, 0, ARG_DB|ARG_ON_OFF|ARG_MAGIC|CFG_LASTBIND,
		&config_generic, "( OLcfgDbAt:0.22 NAME 'olcLastBind' "
			"EQUALITY booleanMatch "
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
449
450
451
452
453
	{ "ldapsyntax",	"syntax", 2, 0, 0,
		ARG_PAREN|ARG_MAGIC|CFG_SYNTAX,
		&config_generic, "( OLcfgGlAt:85 NAME 'olcLdapSyntaxes' "
			"DESC 'OpenLDAP ldapSyntax' "
			"EQUALITY caseIgnoreMatch "
454
			"SUBSTR caseIgnoreSubstringsMatch "
455
456
			"SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )",
				NULL, NULL },
457
	{ "limits", "limits", 2, 0, 0, ARG_DB|ARG_MAGIC|CFG_LIMITS,
458
		&config_generic, "( OLcfgDbAt:0.5 NAME 'olcLimits' "
459
			"EQUALITY caseIgnoreMatch "
460
			"SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
461
462
463
	{ "listener-threads", "count", 2, 0, 0,
		ARG_UINT|ARG_MAGIC|CFG_LTHREADS, &config_generic,
		"( OLcfgGlAt:93 NAME 'olcListenerThreads' "
464
			"EQUALITY integerMatch "
465
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
466
	{ "localSSF", "ssf", 2, 2, 0, ARG_INT,
467
		&local_ssf, "( OLcfgGlAt:26 NAME 'olcLocalSSF' "
468
			"EQUALITY integerMatch "
469
470
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL,
			{ .v_int = LDAP_PVT_SASL_LOCAL_SSF } },
471
	{ "logfile", "file", 2, 2, 0, ARG_STRING|ARG_MAGIC|CFG_LOGFILE,
472
		&config_generic, "( OLcfgGlAt:27 NAME 'olcLogFile' "
473
			"EQUALITY caseExactMatch "
474
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
475
	{ "loglevel", "level", 2, 0, 0, ARG_MAGIC,
476
		&config_loglevel, "( OLcfgGlAt:28 NAME 'olcLogLevel' "
477
			"EQUALITY caseIgnoreMatch "
478
479
			"SYNTAX OMsDirectoryString )", NULL, NULL },
	{ "maxDerefDepth", "depth", 2, 2, 0, ARG_DB|ARG_INT|ARG_MAGIC|CFG_DEPTH,
480
		&config_generic, "( OLcfgDbAt:0.6 NAME 'olcMaxDerefDepth' "
481
			"EQUALITY integerMatch "
482
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
483
484
	{ "multiprovider", "on|off", 2, 2, 0, ARG_DB|ARG_ON_OFF|ARG_MAGIC|CFG_MULTIPROVIDER,
		&config_generic, "( OLcfgDbAt:0.16 NAME ( 'olcMultiProvider' 'olcMirrorMode' ) "
485
			"EQUALITY booleanMatch "
486
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
487
488
	{ "moduleload",	"file", 2, 0, 0,
#ifdef SLAPD_MODULES
489
		ARG_MAGIC|CFG_MODLOAD|ARG_NO_DELETE, &config_generic,
490
491
492
#else
		ARG_IGNORED, NULL,
#endif
493
		"( OLcfgGlAt:30 NAME 'olcModuleLoad' "
494
			"EQUALITY caseIgnoreMatch "
495
			"SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
496
497
	{ "modulepath", "path", 2, 2, 0,
#ifdef SLAPD_MODULES
498
		ARG_MAGIC|CFG_MODPATH|ARG_NO_DELETE|ARG_NO_INSERT, &config_generic,
499
500
501
#else
		ARG_IGNORED, NULL,
#endif
502
		"( OLcfgGlAt:31 NAME 'olcModulePath' "
503
			"EQUALITY caseExactMatch "
Howard Chu's avatar
Howard Chu committed
504
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
505
506
507
	{ "monitoring", "TRUE|FALSE", 2, 2, 0,
		ARG_MAGIC|CFG_MONITORING|ARG_DB|ARG_ON_OFF, &config_generic,
		"( OLcfgDbAt:0.18 NAME 'olcMonitoring' "
508
			"EQUALITY booleanMatch "
509
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
510
	{ "objectclass", "objectclass", 2, 0, 0, ARG_PAREN|ARG_MAGIC|CFG_OC,
511
		&config_generic, "( OLcfgGlAt:32 NAME 'olcObjectClasses' "
Howard Chu's avatar
Howard Chu committed
512
		"DESC 'OpenLDAP object classes' "
513
		"EQUALITY caseIgnoreMatch "
514
		"SUBSTR caseIgnoreSubstringsMatch "
515
		"SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )",
Howard Chu's avatar
Howard Chu committed
516
			NULL, NULL },
517
	{ "objectidentifier", "name> <oid",	3, 3, 0, ARG_MAGIC|CFG_OID,
518
		&config_generic, "( OLcfgGlAt:33 NAME 'olcObjectIdentifier' "
519
			"EQUALITY caseIgnoreMatch "
520
			"SUBSTR caseIgnoreSubstringsMatch "
521
			"SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
522
	{ "overlay", "overlay", 2, 2, 0, ARG_MAGIC,
523
		&config_overlay, "( OLcfgGlAt:34 NAME 'olcOverlay' "
524
			"SUP olcDatabase SINGLE-VALUE X-ORDERED 'SIBLINGS' )", NULL, NULL },
525
	{ "password-crypt-salt-format", "salt", 2, 2, 0, ARG_STRING|ARG_MAGIC|CFG_SALT,
526
		&config_generic, "( OLcfgGlAt:35 NAME 'olcPasswordCryptSaltFormat' "
527
			"EQUALITY caseIgnoreMatch "
528
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
529
	{ "password-hash", "hash", 2, 0, 0, ARG_MAGIC,
530
		&config_passwd_hash, "( OLcfgGlAt:36 NAME 'olcPasswordHash' "
531
			"EQUALITY caseIgnoreMatch "
532
533
			"SYNTAX OMsDirectoryString )", NULL, NULL },
	{ "pidfile", "file", 2, 2, 0, ARG_STRING,
534
		&slapd_pid_file, "( OLcfgGlAt:37 NAME 'olcPidFile' "
535
			"EQUALITY caseExactMatch "
536
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
537
538
539
540
541
542
	{ "plugin", NULL, 0, 0, 0,
#ifdef LDAP_SLAPI
		ARG_MAGIC|CFG_PLUGIN, &config_generic,
#else
		ARG_IGNORED, NULL,
#endif
543
		"( OLcfgGlAt:38 NAME 'olcPlugin' "
544
			"EQUALITY caseIgnoreMatch "
545
			"SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
546
547
548
549
550
551
	{ "pluginlog", "filename", 2, 2, 0,
#ifdef LDAP_SLAPI
		ARG_STRING, &slapi_log_file,
#else
		ARG_IGNORED, NULL,
#endif
552
		"( OLcfgGlAt:39 NAME 'olcPluginLogFile' "
553
			"EQUALITY caseExactMatch "
554
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
555
	{ "readonly", "on|off", 2, 2, 0, ARG_MAY_DB|ARG_ON_OFF|ARG_MAGIC|CFG_RO,
556
		&config_generic, "( OLcfgGlAt:40 NAME 'olcReadOnly' "
557
			"EQUALITY booleanMatch "
558
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
559
	{ "referral", "url", 2, 2, 0, ARG_MAGIC,
560
		&config_referral, "( OLcfgGlAt:41 NAME 'olcReferral' "
561
			"SUP labeledURI SINGLE-VALUE )", NULL, NULL },
562
	{ "replica", "host or uri", 2, 0, 0, ARG_DB|ARG_MAGIC,
Howard Chu's avatar
Howard Chu committed
563
		&config_obsolete, "( OLcfgDbAt:0.7 NAME 'olcReplica' "
564
			"EQUALITY caseIgnoreMatch "
565
			"SUP labeledURI X-ORDERED 'VALUES' )", NULL, NULL },
Howard Chu's avatar
Howard Chu committed
566
567
	{ "replica-argsfile", NULL, 0, 0, 0, ARG_MAY_DB|ARG_MAGIC,
		&config_obsolete, "( OLcfgGlAt:43 NAME 'olcReplicaArgsFile' "
568
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
Howard Chu's avatar
Howard Chu committed
569
570
	{ "replica-pidfile", NULL, 0, 0, 0, ARG_MAY_DB|ARG_MAGIC,
		&config_obsolete, "( OLcfgGlAt:44 NAME 'olcReplicaPidFile' "
571
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
Howard Chu's avatar
Howard Chu committed
572
573
	{ "replicationInterval", NULL, 0, 0, 0, ARG_MAY_DB|ARG_MAGIC,
		&config_obsolete, "( OLcfgGlAt:45 NAME 'olcReplicationInterval' "
574
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
Howard Chu's avatar
Howard Chu committed
575
576
	{ "replogfile", "filename", 2, 2, 0, ARG_MAY_DB|ARG_MAGIC,
		&config_obsolete, "( OLcfgGlAt:46 NAME 'olcReplogFile' "
577
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
578
	{ "require", "features", 2, 0, 7, ARG_MAY_DB|ARG_MAGIC,
579
		&config_requires, "( OLcfgGlAt:47 NAME 'olcRequires' "
580
			"EQUALITY caseIgnoreMatch "
581
582
			"SYNTAX OMsDirectoryString )", NULL, NULL },
	{ "restrict", "op_list", 2, 0, 0, ARG_MAY_DB|ARG_MAGIC,
583
		&config_restrict, "( OLcfgGlAt:48 NAME 'olcRestrict' "
584
			"EQUALITY caseIgnoreMatch "
585
586
587
588
589
590
591
			"SYNTAX OMsDirectoryString )", NULL, NULL },
	{ "reverse-lookup", "on|off", 2, 2, 0,
#ifdef SLAPD_RLOOKUPS
		ARG_ON_OFF, &use_reverse_lookup,
#else
		ARG_IGNORED, NULL,
#endif
592
		"( OLcfgGlAt:49 NAME 'olcReverseLookup' "
593
			"EQUALITY booleanMatch "
594
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
Pierangelo Masarati's avatar
Pierangelo Masarati committed
595
	{ "rootdn", "dn", 2, 2, 0, ARG_DB|ARG_DN|ARG_QUOTE|ARG_MAGIC,
596
		&config_rootdn, "( OLcfgDbAt:0.8 NAME 'olcRootDN' "
597
			"EQUALITY distinguishedNameMatch "
598
			"SYNTAX OMsDN SINGLE-VALUE )", NULL, NULL },
599
	{ "rootDSE", "file", 2, 2, 0, ARG_MAGIC|CFG_ROOTDSE,
600
		&config_generic, "( OLcfgGlAt:51 NAME 'olcRootDSE' "
601
			"EQUALITY caseIgnoreMatch "
602
			"SYNTAX OMsDirectoryString )", NULL, NULL },
Howard Chu's avatar
Howard Chu committed
603
	{ "rootpw", "password", 2, 2, 0, ARG_BERVAL|ARG_DB|ARG_MAGIC,
604
		&config_rootpw, "( OLcfgDbAt:0.9 NAME 'olcRootPW' "
605
			"EQUALITY octetStringMatch "
606
			"SYNTAX OMsOctetString SINGLE-VALUE )", NULL, NULL },
607
608
	{ "sasl-authz-policy", NULL, 2, 2, 0, ARG_MAGIC|CFG_AZPOLICY,
		&config_generic, NULL, NULL, NULL },
609
610
611
612
613
614
615
	{ "sasl-auxprops", NULL, 2, 0, 0,
#ifdef HAVE_CYRUS_SASL
		ARG_STRING|ARG_UNIQUE, &slap_sasl_auxprops,
#else
		ARG_IGNORED, NULL,
#endif
		"( OLcfgGlAt:89 NAME 'olcSaslAuxprops' "
616
			"EQUALITY caseIgnoreMatch "
617
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
	{ "sasl-auxprops-dontusecopy", NULL, 2, 0, 0,
#if defined(HAVE_CYRUS_SASL) && defined(SLAP_AUXPROP_DONTUSECOPY)
		ARG_MAGIC|CFG_AZDUC, &config_generic,
#else
		ARG_IGNORED, NULL,
#endif
		"( OLcfgGlAt:91 NAME 'olcSaslAuxpropsDontUseCopy' "
			"EQUALITY caseIgnoreMatch "
			"SYNTAX OMsDirectoryString )", NULL, NULL },
	{ "sasl-auxprops-dontusecopy-ignore", "true|FALSE", 2, 0, 0,
#if defined(HAVE_CYRUS_SASL) && defined(SLAP_AUXPROP_DONTUSECOPY)
		ARG_ON_OFF|CFG_AZDUC_IGNORE, &slap_dontUseCopy_ignore,
#else
		ARG_IGNORED, NULL,
#endif
		"( OLcfgGlAt:92 NAME 'olcSaslAuxpropsDontUseCopyIgnore' "
			"EQUALITY booleanMatch "
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
636
637
638
639
640
641
642
643
644
	{ "sasl-cbinding", NULL, 2, 2, 0,
#ifdef HAVE_CYRUS_SASL
		ARG_STRING, &sasl_cbinding,
#else
		ARG_IGNORED, NULL,
#endif
		"( OLcfgGlAt:100 NAME 'olcSaslCBinding' "
			"EQUALITY caseIgnoreMatch "
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
645
646
	{ "sasl-host", "host", 2, 2, 0,
#ifdef HAVE_CYRUS_SASL
647
		ARG_STRING|ARG_UNIQUE, &sasl_host,
648
649
650
#else
		ARG_IGNORED, NULL,
#endif
651
		"( OLcfgGlAt:53 NAME 'olcSaslHost' "
652
			"EQUALITY caseIgnoreMatch "
653
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
654
655
656
657
658
659
	{ "sasl-realm", "realm", 2, 2, 0,
#ifdef HAVE_CYRUS_SASL
		ARG_STRING|ARG_UNIQUE, &global_realm,
#else
		ARG_IGNORED, NULL,
#endif
660
		"( OLcfgGlAt:54 NAME 'olcSaslRealm' "
661
			"EQUALITY caseExactMatch "
662
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
663
664
665
666
667
668
669
670
	{ "sasl-regexp", NULL, 3, 3, 0, ARG_MAGIC|CFG_AZREGEXP,
		&config_generic, NULL, NULL, NULL },
	{ "sasl-secprops", "properties", 2, 2, 0,
#ifdef HAVE_CYRUS_SASL
		ARG_MAGIC|CFG_SASLSECP, &config_generic,
#else
		ARG_IGNORED, NULL,
#endif
671
		"( OLcfgGlAt:56 NAME 'olcSaslSecProps' "
672
			"EQUALITY caseExactMatch "
673
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
674
675
	{ "saslRegexp",	NULL, 3, 3, 0, ARG_MAGIC|CFG_AZREGEXP,
		&config_generic, NULL, NULL, NULL },
Pierangelo Masarati's avatar
Pierangelo Masarati committed
676
	{ "schemadn", "dn", 2, 2, 0, ARG_MAY_DB|ARG_DN|ARG_QUOTE|ARG_MAGIC,
677
		&config_schema_dn, "( OLcfgGlAt:58 NAME 'olcSchemaDN' "
678
			"EQUALITY distinguishedNameMatch "
679
			"SYNTAX OMsDN SINGLE-VALUE )", NULL, NULL },
680
	{ "security", "factors", 2, 0, 0, ARG_MAY_DB|ARG_MAGIC,
681
		&config_security, "( OLcfgGlAt:59 NAME 'olcSecurity' "
682
			"EQUALITY caseIgnoreMatch "
683
			"SYNTAX OMsDirectoryString )", NULL, NULL },
684
685
686
687
	{ "serverID", "number> <[URI]", 2, 3, 0, ARG_MAGIC|CFG_SERVERID,
		&config_generic, "( OLcfgGlAt:81 NAME 'olcServerID' "
			"EQUALITY caseIgnoreMatch "
			"SYNTAX OMsDirectoryString )", NULL, NULL },
688
	{ "sizelimit", "limit",	2, 0, 0, ARG_MAY_DB|ARG_MAGIC,
689
		&config_sizelimit, "( OLcfgGlAt:60 NAME 'olcSizeLimit' "
690
			"EQUALITY caseExactMatch "
691
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
692
	{ "sockbuf_max_incoming", "max", 2, 2, 0, ARG_BER_LEN_T,
693
		&sockbuf_max_incoming, "( OLcfgGlAt:61 NAME 'olcSockbufMaxIncoming' "
694
			"EQUALITY integerMatch "
695
696
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL,
			{ .v_ber_t = SLAP_SB_MAX_INCOMING_DEFAULT } },
697
	{ "sockbuf_max_incoming_auth", "max", 2, 2, 0, ARG_BER_LEN_T,
698
		&sockbuf_max_incoming_auth, "( OLcfgGlAt:62 NAME 'olcSockbufMaxIncomingAuth' "
699
			"EQUALITY integerMatch "
700
701
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL,
			{ .v_ber_t = SLAP_SB_MAX_INCOMING_AUTH } },
Howard Chu's avatar
Howard Chu committed
702
703
704
705
706
	{ "sortvals", "attr", 2, 0, 0, ARG_MAGIC|CFG_SORTVALS,
		&config_generic, "( OLcfgGlAt:83 NAME 'olcSortVals' "
			"DESC 'Attributes whose values will always be sorted' "
			"EQUALITY caseIgnoreMatch "
			"SYNTAX OMsDirectoryString )", NULL, NULL },
707
	{ "subordinate", "[advertise]", 1, 2, 0, ARG_DB|ARG_MAGIC,
Howard Chu's avatar
Howard Chu committed
708
		&config_subordinate, "( OLcfgDbAt:0.15 NAME 'olcSubordinate' "
709
			"EQUALITY caseExactMatch "
710
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
Pierangelo Masarati's avatar
Pierangelo Masarati committed
711
	{ "suffix",	"suffix", 2, 2, 0, ARG_DB|ARG_DN|ARG_QUOTE|ARG_MAGIC,
712
		&config_suffix, "( OLcfgDbAt:0.10 NAME 'olcSuffix' "
713
			"EQUALITY distinguishedNameMatch "
714
			"SYNTAX OMsDN )", NULL, NULL },
Howard Chu's avatar
Howard Chu committed
715
	{ "sync_use_subentry", NULL, 0, 0, 0, ARG_ON_OFF|ARG_DB|ARG_MAGIC|CFG_SYNC_SUBENTRY,
716
717
		&config_generic, "( OLcfgDbAt:0.19 NAME 'olcSyncUseSubentry' "
			"DESC 'Store sync context in a subentry' "
718
			"EQUALITY booleanMatch "
719
			"SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
720
	{ "syncrepl", NULL, 0, 0, 0, ARG_DB|ARG_MAGIC,
721
		&syncrepl_config, "( OLcfgDbAt:0.11 NAME 'olcSyncrepl' "
722
			"EQUALITY caseIgnoreMatch "
723
			"SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
724
725
726
727
728
729
730
	{ "tcp-buffer", "[listener=<listener>] [{read|write}=]size", 0, 0, 0,
#ifndef LDAP_TCP_BUFFER
		ARG_IGNORED, NULL,
#else /* LDAP_TCP_BUFFER */
		ARG_MAGIC, &config_tcp_buffer,
#endif /* LDAP_TCP_BUFFER */
			"( OLcfgGlAt:90 NAME 'olcTCPBuffer' "
731
			"EQUALITY caseExactMatch "
732
			"DESC 'Custom TCP buffer size' "
Pierangelo Masarati's avatar
Pierangelo Masarati committed
733
			"SYNTAX OMsDirectoryString )", NULL, NULL },
734
735
736
	{ "threads", "count", 2, 2, 0,
		ARG_INT|ARG_MAGIC|CFG_THREADS, &config_generic,
		"( OLcfgGlAt:66 NAME 'olcThreads' "
737
			"EQUALITY integerMatch "
738
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
Howard Chu's avatar
Howard Chu committed
739
740
741
	{ "threadqueues", "count", 2, 2, 0,
		ARG_INT|ARG_MAGIC|CFG_THREADQS, &config_generic,
		"( OLcfgGlAt:95 NAME 'olcThreadQueues' "
742
			"EQUALITY integerMatch "
Howard Chu's avatar
Howard Chu committed
743
			"SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
744
	{ "timelimit", "limit", 2, 0, 0, ARG_MAY_DB|ARG_MAGIC,
745
		&config_timelimit, "( OLcfgGlAt:67 NAME 'olcTimeLimit' "
746
			"EQUALITY caseExactMatch "
747
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
748
749
750
751
752
753
754
755
	{ "TLSCACertificate", NULL, 2, 2, 0,
#ifdef HAVE_TLS
		CFG_TLS_CACERT|ARG_BINARY|ARG_MAGIC, &config_tls_option,
#else
		ARG_IGNORED, NULL,
#endif
		"( OLcfgGlAt:97 NAME 'olcTLSCACertificate' "
			"DESC 'X.509 certificate, must use ;binary' "
756
			"EQUALITY certificateExactMatch "
757
			"SYNTAX 1.3.6.1.4.1.1466.115.121.1.8 SINGLE-VALUE )", NULL, NULL },
758
	{ "TLSCACertificateFile", NULL, 2, 2, 0,
759
760
761
762
763
#ifdef HAVE_TLS
		CFG_TLS_CA_FILE|ARG_STRING|ARG_MAGIC, &config_tls_option,
#else
		ARG_IGNORED, NULL,
#endif
764
		"( OLcfgGlAt:68 NAME 'olcTLSCACertificateFile' "
765
			"EQUALITY caseExactMatch "
766
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
767
	{ "TLSCACertificatePath", NULL,	2, 2, 0,
768
769
770
771
772
#ifdef HAVE_TLS
		CFG_TLS_CA_PATH|ARG_STRING|ARG_MAGIC, &config_tls_option,
#else
		ARG_IGNORED, NULL,
#endif
773
		"( OLcfgGlAt:69 NAME 'olcTLSCACertificatePath' "
774
			"EQUALITY caseExactMatch "
775
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
776
777
778
779
780
781
782
783
	{ "TLSCertificate", NULL, 2, 2, 0,
#ifdef HAVE_TLS
		CFG_TLS_CERT|ARG_BINARY|ARG_MAGIC, &config_tls_option,
#else
		ARG_IGNORED, NULL,
#endif
		"( OLcfgGlAt:98 NAME 'olcTLSCertificate' "
			"DESC 'X.509 certificate, must use ;binary' "
784
			"EQUALITY certificateExactMatch "
785
			"SYNTAX 1.3.6.1.4.1.1466.115.121.1.8 SINGLE-VALUE )", NULL, NULL },
786
	{ "TLSCertificateFile", NULL, 2, 2, 0,
787
788
789
790
791
#ifdef HAVE_TLS
		CFG_TLS_CERT_FILE|ARG_STRING|ARG_MAGIC, &config_tls_option,
#else
		ARG_IGNORED, NULL,
#endif
792
		"( OLcfgGlAt:70 NAME 'olcTLSCertificateFile' "
793
			"EQUALITY caseExactMatch "
794
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
795
796
797
798
799
800
801
802
	{ "TLSCertificateKey", NULL, 2, 2, 0,
#ifdef HAVE_TLS
		CFG_TLS_KEY|ARG_BINARY|ARG_MAGIC, &config_tls_option,
#else
		ARG_IGNORED, NULL,
#endif
		"( OLcfgGlAt:99 NAME 'olcTLSCertificateKey' "
			"DESC 'X.509 privateKey, must use ;binary' "
Howard Chu's avatar
Howard Chu committed
803
804
			"EQUALITY privateKeyMatch "
			"SYNTAX 1.2.840.113549.1.8.1.1 SINGLE-VALUE )", NULL, NULL },
805
	{ "TLSCertificateKeyFile", NULL, 2, 2, 0,
806
807
808
809
810
#ifdef HAVE_TLS
		CFG_TLS_CERT_KEY|ARG_STRING|ARG_MAGIC, &config_tls_option,
#else
		ARG_IGNORED, NULL,
#endif
811
		"( OLcfgGlAt:71 NAME 'olcTLSCertificateKeyFile' "
812
			"EQUALITY caseExactMatch "
813
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
814
	{ "TLSCipherSuite",	NULL, 2, 2, 0,
815
816
817
818
819
#ifdef HAVE_TLS
		CFG_TLS_CIPHER|ARG_STRING|ARG_MAGIC, &config_tls_option,
#else
		ARG_IGNORED, NULL,
#endif
820
		"( OLcfgGlAt:72 NAME 'olcTLSCipherSuite' "
821
			"EQUALITY caseExactMatch "
822
			"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
823
	{ "TLSCRLCheck", NULL, 2, 2, 0,
824
#if defined(HAVE_TLS) && defined(HAVE_OPENSSL)