/[smeserver]/rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0-check_slapd.conf_syntax.patch
ViewVC logotype

Contents of /rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0-check_slapd.conf_syntax.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Mar 14 15:36:28 2011 UTC (13 years, 2 months ago) by vip-ire
Branch: MAIN
CVS Tags: e-smith-ldap-5_2_0-79_el5_sme, e-smith-ldap-5_2_0-81_el5_sme, e-smith-ldap-5_2_0-80_el5_sme, e-smith-ldap-5_2_0-76_el5_sme, e-smith-ldap-5_2_0-77_el5_sme, e-smith-ldap-5_2_0-78_el5_sme, HEAD
* Mon Mar 14 2011 Daniel Berteaud <daniel@firewall-services.com> 5.2.0-76.sme
- Check slapd.conf syntax before trying to dump the database [SME: 6452]

1 diff -Nur e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/gentle-ldap-dump e-smith-ldap-5.2.0_ldif/root/etc/e-smith/events/actions/gentle-ldap-dump
2 --- e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/gentle-ldap-dump 2002-10-02 20:02:37.000000000 +0200
3 +++ e-smith-ldap-5.2.0_ldif/root/etc/e-smith/events/actions/gentle-ldap-dump 2010-12-30 19:30:25.000000000 +0100
4 @@ -28,6 +28,11 @@
5 use esmith::ConfigDB;
6 use esmith::util;
7
8 +# Stop now if slapd.conf has syntax error
9 +unless (system("/usr/sbin/slaptest -u 2>/dev/null") == 0){
10 + die "Aborting ldap dump because of errors in slapd.conf\n";
11 +}
12 +
13 my $c = esmith::ConfigDB->open_ro;
14 my $domain = $c->get('DomainName')
15 || die("Couldn't determine domain name");
16 diff -Nur e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-dump e-smith-ldap-5.2.0_ldif/root/etc/e-smith/events/actions/ldap-dump
17 --- e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-dump 2003-04-16 17:43:23.000000000 +0200
18 +++ e-smith-ldap-5.2.0_ldif/root/etc/e-smith/events/actions/ldap-dump 2010-12-30 19:29:56.000000000 +0100
19 @@ -27,6 +27,11 @@
20 use Errno;
21 use esmith::ConfigDB;
22
23 +# Stop now if slapd.conf has syntax error
24 +unless (system("/usr/sbin/slaptest -u 2>/dev/null") == 0){
25 + die "Aborting ldap dump because of errors in slapd.conf\n";
26 +}
27 +
28 my $domain = esmith::ConfigDB->open->get('DomainName')
29 || die("Couldn't determine domain name");
30 $domain = $domain->value;
31 diff -Nur e-smith-ldap-5.2.0/root/var/service/ldap/finish e-smith-ldap-5.2.0_ldif/root/var/service/ldap/finish
32 --- e-smith-ldap-5.2.0/root/var/service/ldap/finish 2005-03-23 18:36:25.000000000 +0100
33 +++ e-smith-ldap-5.2.0_ldif/root/var/service/ldap/finish 2010-12-30 19:28:03.000000000 +0100
34 @@ -1,3 +1,3 @@
35 #! /bin/sh
36
37 -exec /usr/sbin/slapcat -l ldif
38 +/usr/sbin/slaptest -u 2>/dev/null && exec /usr/sbin/slapcat -l ldif

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed