summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartinh <martinh@openbsd.org>2010-06-05 17:29:14 +0000
committermartinh <martinh@openbsd.org>2010-06-05 17:29:14 +0000
commitb094d8e20e55185c557bf4b87f8a600ceae30a4d (patch)
treeeb4a79080ce4adfbd746f24e5c9cc0978a17b78e
parentlast piece (diff)
downloadwireguard-openbsd-b094d8e20e55185c557bf4b87f8a600ceae30a4d.tar.xz
wireguard-openbsd-b094d8e20e55185c557bf4b87f8a600ceae30a4d.zip
Install a default ldapd.conf, and standard schema files in /etc/ldap.
ok deraadt@
-rw-r--r--etc/Makefile4
-rw-r--r--etc/ldapd.conf18
-rw-r--r--etc/mtree/4.4BSD.dist18
-rw-r--r--usr.sbin/ldapd/Makefile11
4 files changed, 48 insertions, 3 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 673835546d5..0c7fc1cd140 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.287 2010/03/23 21:31:02 espie Exp $
+# $OpenBSD: Makefile,v 1.288 2010/06/05 17:29:14 martinh Exp $
TZDIR= /usr/share/zoneinfo
LOCALTIME= Canada/Mountain
@@ -101,6 +101,7 @@ distribution-etc-root-var: distrib-dirs
${INSTALL} -c -o root -g wheel -m 600 ipsec.conf ${DESTDIR}/etc
${INSTALL} -c -o root -g wheel -m 600 sasyncd.conf ${DESTDIR}/etc
${INSTALL} -c -o root -g wheel -m 600 snmpd.conf ${DESTDIR}/etc
+ ${INSTALL} -c -o root -g wheel -m 600 ldapd.conf ${DESTDIR}/etc
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
cd root; \
@@ -248,6 +249,7 @@ distribution-etc-root-var: distrib-dirs
cd ../gnu/usr.bin/lynx && exec ${MAKE} -f Makefile.bsd-wrapper distribution
cd ../usr.bin/bgplg && exec ${MAKE} distribution
cd ../usr.bin/mail && exec ${MAKE} distribution
+ cd ../usr.sbin/ldapd && exec ${MAKE} distribution
cd mail && exec ${MAKE} distribution
${INSTALL} -c -o root -g wheel -m 600 root/root.mail \
${DESTDIR}/var/mail/root
diff --git a/etc/ldapd.conf b/etc/ldapd.conf
new file mode 100644
index 00000000000..3bf202fc434
--- /dev/null
+++ b/etc/ldapd.conf
@@ -0,0 +1,18 @@
+# $OpenBSD: ldapd.conf,v 1.1 2010/06/05 17:29:14 martinh Exp $
+
+include "/etc/ldap/core.schema"
+include "/etc/ldap/inetorgperson.schema"
+include "/etc/ldap/nis.schema"
+
+listen on lo0
+listen on "/var/run/ldapi"
+
+#namespace "dc=example,dc=com" {
+# rootdn "cn=admin,dc=example,dc=com"
+# rootpw "secret"
+# index sn
+# index givenName
+# index cn
+# index mail
+#}
+
diff --git a/etc/mtree/4.4BSD.dist b/etc/mtree/4.4BSD.dist
index 4d96a615e0a..41d19f5a508 100644
--- a/etc/mtree/4.4BSD.dist
+++ b/etc/mtree/4.4BSD.dist
@@ -1,4 +1,4 @@
-# $OpenBSD: 4.4BSD.dist,v 1.204 2010/05/17 18:14:47 naddy Exp $
+# $OpenBSD: 4.4BSD.dist,v 1.205 2010/06/05 17:29:14 martinh Exp $
/set type=dir uname=root gname=wheel mode=0755
# .
@@ -115,6 +115,17 @@ kerberosV
# ./etc/kerberosV
..
+# ./etc/ldap
+ldap
+
+# ./etc/ldap/certs
+certs mode=0700
+# ./etc/ldap/certs
+..
+
+# ./etc/ldap
+..
+
# ./etc/mail
mail
# ./etc/mail
@@ -2331,6 +2342,11 @@ tabs gname=crontab mode=01730
# ./var/db
db
+# ./var/db/ldap
+ldap mode=0700
+# ./var/db/ldap
+..
+
# ./var/db/ns
ns
# ./var/db/ns
diff --git a/usr.sbin/ldapd/Makefile b/usr.sbin/ldapd/Makefile
index 8dc73af5278..519c6648ded 100644
--- a/usr.sbin/ldapd/Makefile
+++ b/usr.sbin/ldapd/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.2 2010/05/31 17:47:12 martinh Exp $
+# $OpenBSD: Makefile,v 1.3 2010/06/05 17:29:14 martinh Exp $
PROG= ldapd
MAN= ldapd.8 ldapd.conf.5
@@ -17,5 +17,14 @@ CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual
CFLAGS+= -Wsign-compare
CLEANFILES+= y.tab.h parse.c
+SCHEMA_FILES= core.schema \
+ inetorgperson.schema \
+ nis.schema
+
+distribution:
+ for i in ${SCHEMA_FILES}; do \
+ ${INSTALL} -C -o root -g wheel -m 0644 ${.CURDIR}/schema/$$i ${DESTDIR}/etc/ldap/; \
+ done
+
.include <bsd.prog.mk>