xref: /netbsd-src/external/bsd/openldap/dist/tests/data/slapd-sql.conf (revision e670fd5c413e99c2f6a37901bb21c537fcd322d2)
1# provider slapd config -- for testing
2# $OpenLDAP$
3## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4##
5## Copyright 1998-2021 The OpenLDAP Foundation.
6## All rights reserved.
7##
8## Redistribution and use in source and binary forms, with or without
9## modification, are permitted only as authorized by the OpenLDAP
10## Public License.
11##
12## A copy of this license is available in the file LICENSE in the
13## top-level directory of the distribution or, alternatively, at
14## <http://www.OpenLDAP.org/license.html>.
15
16#ucdata-path	./ucdata
17include		@SCHEMADIR@/core.schema
18include		@SCHEMADIR@/cosine.schema
19include		@SCHEMADIR@/inetorgperson.schema
20include		@SCHEMADIR@/openldap.schema
21include		@SCHEMADIR@/nis.schema
22pidfile		@TESTDIR@/slapd.1.pid
23argsfile	@TESTDIR@/slapd.1.args
24
25#sqlmod#modulepath ../servers/slapd/back-sql/
26#sqlmod#moduleload back_sql.la
27
28#
29# normal installations should protect root dse,
30# cn=monitor, cn=schema, and cn=config
31#
32
33access to attrs=userpassword
34	by self =w
35	by anonymous =x
36
37access to *
38	by * read
39
40#######################################################################
41# sql database definitions
42#######################################################################
43
44database        sql
45suffix          "dc=example,dc=com"
46rootdn		"cn=Manager,dc=example,dc=com"
47rootpw          secret
48dbname          example
49dbuser          manager
50dbpasswd        secret
51
52#
53# rdbms specific directives
54#
55# IBM db2
56#ibmdb2#upper_func      	"ucase"
57#ibmdb2#upper_needs_cast	"yes"
58#ibmdb2#concat_pattern  	"?||?"
59#ibmdb2#children_cond		"ucase(ldap_entries.dn)=ucase(cast(? as varchar(255)))"
60#ibmdb2#create_needs_select	"yes"
61#ibmdb2#insentry_stmt		"insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values ((select case when max(id) is null then 1 else max(id) + 1 end from ldap_entries),?,?,?,?)"
62#
63# PostgreSQL
64#pgsql#insentry_stmt		"insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values ((select case when max(id) is null then 1 else max(id) + 1 end from ldap_entries),?,?,?,?)"
65#pgsql#upper_func		"upper"
66#pgsql#strcast_func		"text"
67#pgsql#concat_pattern	"?||?"
68#
69# MySQL
70#mysql#concat_pattern	"concat(?,?)"
71
72has_ldapinfo_dn_ru      no
73
74database monitor
75