16538104 Starting svc:/network/ldap/server:openldap_24 fails s11-update
authorStacey Marshall <Stacey.Marshall@Oracle.COM>
Tue, 02 Jun 2015 08:44:37 +0100
branchs11-update
changeset 4384 b2d57f949f7f
parent 4376 f3801994dee3
child 4385 a2e3ced2a414
16538104 Starting svc:/network/ldap/server:openldap_24 fails
components/openldap/Solaris/ldap-olslapd
components/openldap/openldap.p5m
--- a/components/openldap/Solaris/ldap-olslapd	Fri May 29 13:29:35 2015 -0700
+++ b/components/openldap/Solaris/ldap-olslapd	Tue Jun 02 08:44:37 2015 +0100
@@ -21,13 +21,13 @@
 # CDDL HEADER END
 #
 
-# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 source /lib/svc/share/smf_include.sh
 
 typeset -r LDAPUSR=openldap
 typeset -r LDAPGRP=openldap
-typeset -r VARRUNDIR=/var/run/openldap
+typeset -r VARRUNDIR=/var/openldap/run
 typeset -r PIDFILE=${VARRUNDIR}/slapd.pid
 typeset -r CONF_FILE=/etc/openldap/slapd.conf
 typeset -r SLAPD="/usr/lib/slapd -u ${LDAPUSR} -g ${LDAPGRP} -f ${CONF_FILE}"
@@ -38,7 +38,7 @@
 case "$1" in
 start)
         if [[ ! -d ${VARRUNDIR} ]] ; then
-		/usr/bin/mkdir -m 755 ${VARRUNDIR} || exit $SMF_EXIT_ERR_CONFIG
+		/usr/bin/mkdir -m 700 ${VARRUNDIR} || exit $SMF_EXIT_ERR_CONFIG
 		/usr/bin/chown ${LDAPUSR}:${LDAPGRP} ${VARRUNDIR}
         else
 		/bin/rm -f ${PIDFILE}
--- a/components/openldap/openldap.p5m	Fri May 29 13:29:35 2015 -0700
+++ b/components/openldap/openldap.p5m	Tue Jun 02 08:44:37 2015 +0100
@@ -559,10 +559,12 @@
 file path=usr/share/man/man8oldap/slapschema.8oldap
 file path=usr/share/man/man8oldap/slaptest.8oldap
 dir  path=var
-dir  path=var/openldap
-dir  path=var/openldap/openldap-data
+dir  path=var/openldap owner=openldap group=openldap
+dir  path=var/openldap/openldap-data owner=openldap group=openldap mode=700
+file var/openldap/openldap-data/DB_CONFIG.example \
+    path=var/openldap/openldap-data/DB_CONFIG overlay=allow preserve=true
 file path=var/openldap/openldap-data/DB_CONFIG.example
-dir  path=var/openldap/run
+dir  path=var/openldap/run owner=openldap group=openldap mode=700
 group groupname=openldap gid=75
 user username=openldap ftpuser=false gcos-field="OpenLDAP User" group=openldap \
     uid=75