Skip to content

Commit 610b69b

Browse files
committed
Merge branch 'hotfix-0.10.1' into stable
2 parents 714a2ff + 1403dbd commit 610b69b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3728
-143
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1+
## 0.10.1 (release date: 2015-05-17)
2+
- Add ldapi
3+
- Add custom ldap schema
4+
- Auto convert .schema to .ldif
5+
- Fixes issues #2 #3
6+
17
## 0.10.0 (release date: 2015-03-03)
2-
- New version initial release
8+
- New version initial release

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = osixia/openldap
2-
VERSION = 0.10.0
2+
VERSION = 0.10.1
33

44
.PHONY: all build test tag_latest release
55

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ make sure to replace `CONTAINER_ID` by your container id :
2727
You should now be in the container terminal,
2828
and we can search on the ldap server :
2929

30-
ldapsearch -x -h 127.0.0.1 -b dc=example,dc=org
30+
ldapsearch -x -h 127.0.0.1 -b dc=example,dc=org -D "cn=admin,dc=example,dc=org" -w admin
3131

3232
This should output :
3333

@@ -65,7 +65,7 @@ By default the admin has the password **admin**. All those default settings can
6565

6666
The directories `/var/lib/ldap` (LDAP database files) and `/etc/ldap/slapd.d` (LDAP config files) has been declared as volumes, so your ldap files are saved outside the container in data volumes.
6767

68-
This mean that you can stop, and restart the container and get back your ldap without losing any data. But if you remove the container, data volumes will me removed too, except if you have linked this data volume to an other container.
68+
Be careful, if you remove the container, data volumes will me removed too, except if you have linked this data volume to an other container.
6969

7070
For more information about docker data volume, please refer to :
7171

image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM osixia/baseimage:0.10.3
1+
FROM osixia/baseimage:0.10.4
22
MAINTAINER Bertrand Gouny <[email protected]>
33

44
# Use baseimage-docker's init system.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
3+
SCHEMAS=$1
4+
5+
tmpd=`mktemp -d`
6+
pushd ${tmpd} >>/dev/null
7+
8+
echo "include /etc/ldap/schema/core.schema" >> convert.dat
9+
echo "include /etc/ldap/schema/cosine.schema" >> convert.dat
10+
echo "include /etc/ldap/schema/nis.schema" >> convert.dat
11+
echo "include /etc/ldap/schema/inetorgperson.schema" >> convert.dat
12+
13+
for schema in ${SCHEMAS} ; do
14+
echo "include ${schema}" >> convert.dat
15+
done
16+
17+
slaptest -f convert.dat -F .
18+
19+
if [ $? -ne 0 ] ; then
20+
echo "slaptest conversion failed"
21+
exit
22+
fi
23+
24+
for schema in ${SCHEMAS} ; do
25+
fullpath=${schema}
26+
schema_name=`basename ${fullpath} .schema`
27+
schema_dir=`dirname ${fullpath}`
28+
ldif_file=${schema_name}.ldif
29+
30+
find . -name *${schema_name}.ldif -exec mv '{}' ./${ldif_file} \;
31+
32+
# TODO: these sed invocations could all be combined
33+
sed -i "/dn:/ c dn: cn=${schema_name},cn=schema,cn=config" ${ldif_file}
34+
sed -i "/cn:/ c cn: ${schema_name}" ${ldif_file}
35+
sed -i '/structuralObjectClass/ d' ${ldif_file}
36+
sed -i '/entryUUID/ d' ${ldif_file}
37+
sed -i '/creatorsName/ d' ${ldif_file}
38+
sed -i '/createTimestamp/ d' ${ldif_file}
39+
sed -i '/entryCSN/ d' ${ldif_file}
40+
sed -i '/modifiersName/ d' ${ldif_file}
41+
sed -i '/modifyTimestamp/ d' ${ldif_file}
42+
43+
# slapd seems to be very sensitive to how a file ends. There should be no blank lines.
44+
sed -i '/^ *$/d' ${ldif_file}
45+
46+
mv ${ldif_file} ${schema_dir}
47+
done
48+
49+
popd >>/dev/null
50+
rm -rf $tmpd
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Mandriva Management Console (MMC) ldap schemas, delete the forlder if not needed ;)

0 commit comments

Comments
 (0)