diff -Nur --no-dereference e-smith-ldap-5.6.0.old/createlinks e-smith-ldap-5.6.0/createlinks --- e-smith-ldap-5.6.0.old/createlinks 2021-05-30 23:43:46.403000000 -0400 +++ e-smith-ldap-5.6.0/createlinks 2021-05-30 23:55:14.310000000 -0400 @@ -50,6 +50,7 @@ event_link("ldap-update", "ldap-update", "80"); templates2events("/etc/rc.d/init.d/masq", "ldap-update"); templates2events("/etc/hosts.allow", "ldap-update"); +templates2events("/etc/openldap/ssl/slapd.pem", qw(ssl-update e-smith-ldap-update bootstrap-console-save) ); safe_symlink("restart", "root/etc/e-smith/events/ldap-update/services2adjust/ldap"); safe_symlink("reload", "root/etc/e-smith/events/ssl-update/services2adjust/ldap"); safe_symlink("reload", "root/etc/e-smith/events/ldap-update/services2adjust/masq"); diff -Nur --no-dereference e-smith-ldap-5.6.0.old/root/etc/templates.metadata/etc/openldap/ssl/slapd.pem e-smith-ldap-5.6.0/root/etc/templates.metadata/etc/openldap/ssl/slapd.pem --- e-smith-ldap-5.6.0.old/root/etc/templates.metadata/etc/openldap/ssl/slapd.pem 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-ldap-5.6.0/root/etc/templates.metadata/etc/openldap/ssl/slapd.pem 2021-05-30 23:52:33.642000000 -0400 @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/home/e-smith/ssl.pem" +OUTPUT_FILENAME="/etc/openldap/ssl/slapd.pem" +GID="ldap" +PERMS=0640 diff -Nur --no-dereference e-smith-ldap-5.6.0.old/root/sbin/e-smith/systemd/ldap-certificate e-smith-ldap-5.6.0/root/sbin/e-smith/systemd/ldap-certificate --- e-smith-ldap-5.6.0.old/root/sbin/e-smith/systemd/ldap-certificate 2021-05-30 23:43:46.405000000 -0400 +++ e-smith-ldap-5.6.0/root/sbin/e-smith/systemd/ldap-certificate 1969-12-31 19:00:00.000000000 -0500 @@ -1,40 +0,0 @@ -#!/usr/bin/perl -w - -#---------------------------------------------------------------------- -# copyright (C) 2005 Mitel Networks Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# Technical support for this program is available from Mitel Networks -# Please visit our web site www.mitel.com/sme/ for details. -#---------------------------------------------------------------------- - -use esmith::util; -use esmith::ConfigDB; -use File::Copy; - -my $c = esmith::ConfigDB->open_ro; -my $s = $c->get('SystemName')->value; -my $d = $c->get('DomainName')->value; - -my $pem = "/etc/openldap/ssl/slapd.pem"; -# Now copy system pem file into jail used by ldap -copy("/home/e-smith/ssl.pem/$s.$d.pem", "$pem.$$") - or die "failed to copy SSL PEM: $!"; -chmod 0640, "$pem.$$"; -esmith::util::chownFile("root", "ldap", "$pem.$$"); -rename("$pem.$$", "$pem") - or die "failed to rename $pem.$$ to $pem: $!"; - diff -Nur --no-dereference e-smith-ldap-5.6.0.old/root/usr/lib/systemd/system/ldap.service e-smith-ldap-5.6.0/root/usr/lib/systemd/system/ldap.service --- e-smith-ldap-5.6.0.old/root/usr/lib/systemd/system/ldap.service 2021-05-30 23:43:46.409000000 -0400 +++ e-smith-ldap-5.6.0/root/usr/lib/systemd/system/ldap.service 2021-05-30 23:56:27.347000000 -0400 @@ -13,7 +13,7 @@ Environment="SLAPD_URLS=ldap:/// ldaps:/// ldapi:///" "SLAPD_OPTIONS=-4 -d 256 -s 0" EnvironmentFile=/etc/sysconfig/slapd ExecStartPre=/sbin/e-smith/service-status ldap -ExecStartPre=/sbin/e-smith/systemd/ldap-certificate +ExecStartPre=/sbin/e-smith/expand-template /etc/openldap/ssl/slapd.pem ExecStartPre=/sbin/e-smith/systemd/ldap-prepare #ExecStartPre=/usr/libexec/openldap/check-config.sh ExecStart=/usr/sbin/slapd -u ldap -h ${SLAPD_URLS} $SLAPD_OPTIONS