diff --git a/build/lemonldap-ng/debian/liblemonldap-ng-manager-conf-perl.install b/build/lemonldap-ng/debian/liblemonldap-ng-manager-conf-perl.install index d68fa2dc7..ab57f565a 100644 --- a/build/lemonldap-ng/debian/liblemonldap-ng-manager-conf-perl.install +++ b/build/lemonldap-ng/debian/liblemonldap-ng-manager-conf-perl.install @@ -1,5 +1,5 @@ debian/tmp/usr/share/perl5/Lemonldap/NG/Manager/Conf* debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::Conf* debian/tmp/usr/share/man/man1/lmConfig_File2MySQL.1p -debian/tmp/usr/bin/lmConfig_File2MySQL +debian/tmp/usr/bin/lmConfig* example/conf /var/lib/lemonldap-ng/ diff --git a/build/lemonldap-ng/debian/liblemonldap-ng-manager-conf-perl.postinst b/build/lemonldap-ng/debian/liblemonldap-ng-manager-conf-perl.postinst index 08df1a95b..a21814e24 100755 --- a/build/lemonldap-ng/debian/liblemonldap-ng-manager-conf-perl.postinst +++ b/build/lemonldap-ng/debian/liblemonldap-ng-manager-conf-perl.postinst @@ -3,8 +3,8 @@ . /usr/share/debconf/confmodule -if [ "$1" = "configure" ] +if [ "$1" == "configure" ] then - chown -R www-data /usr/share/doc/lemonldap-ng/examples/conf + chown -R www-data /var/lib/lemonldap-ng/conf fi diff --git a/modules/lemonldap-ng-manager/Changes b/modules/lemonldap-ng-manager/Changes index ed7c435e6..442ff7130 100644 --- a/modules/lemonldap-ng-manager/Changes +++ b/modules/lemonldap-ng-manager/Changes @@ -1,5 +1,15 @@ Revision history for Perl extension Lemonldap::NG::Manager. +0.64 Sun Apr 29 16:18:31 2007 + - File permissions fix to 0640 in File.pm + - Multiple configuration in the same server is now possible + - LDAP help in english + - LDAPS documentation + - Javascript control (an XML id can not start with a number) + - whatToTrace parameter in configuration interface + - Fix tree bug when an hash ref is not defined + - More tests + 0.61 Thu Mar 29 21:45:44 2007 - configuration is checked before saving diff --git a/modules/lemonldap-ng-manager/MANIFEST b/modules/lemonldap-ng-manager/MANIFEST index ebf1a5251..9de5529fa 100644 --- a/modules/lemonldap-ng-manager/MANIFEST +++ b/modules/lemonldap-ng-manager/MANIFEST @@ -48,6 +48,7 @@ example/lemonldap-ng-manager.js example/lmConfig.mysql example/index.pl example/scripts/lmSessionDump +example/scripts/lmConfigEditor example/soapserver.pl lib/Lemonldap/NG/Manager.pm lib/Lemonldap/NG/Manager/Apache/Session/SOAP.pm diff --git a/modules/lemonldap-ng-manager/example/scripts/lmConfigEditor b/modules/lemonldap-ng-manager/example/scripts/lmConfigEditor new file mode 100644 index 000000000..e58788dcc --- /dev/null +++ b/modules/lemonldap-ng-manager/example/scripts/lmConfigEditor @@ -0,0 +1,75 @@ +#!/usr/bin/perl + +use Lemonldap::NG::Manager::Conf; +use Lemonldap::NG::Manager::Conf::Constants; +use Data::Dumper; +use strict; + +our $refFile = `mktemp`; +our $editFile = `mktemp`; + +chomp $refFile; +chomp $editFile; + +my $conf = Lemonldap::NG::Manager::Conf->new( + { + type => 'File', + dirName => '__CONFDIR__', + } +); + +open F1, ">$refFile" or quit($!); +open F2, ">$editFile" or quit($!); +my $tmp = Dumper($conf->getConf); +print F1 $tmp; +print F2 $tmp; +close F1; +close F2; + +system "editor $editFile"; + +if(`diff $refFile $editFile`) { + my $VAR1; + my $buf; + open F1, $editFile; + while() { + $buf .= $_; + } + eval $buf; + quit($@) if($@); + my $res = $conf->saveConf($VAR1); + if( $res > 0) { + print STDERR "Configuration $res saved\n"; + } + else { + print STDERR "Configuration was not saved:\n "; + if( $res == CONFIG_WAS_CHANGED ) { + print STDERR "Configuration has changed\n"; + } + elsif( $res == DATABASE_LOCKED ) { + print STDERR "Configuration database is or can nor be locked\n"; + } + elsif( $res == UPLOAD_DENIED ) { + print STDERR "You're not authorized to save this configuration\n"; + } + elsif( $res == SYNTAX_ERROR ) { + print STDERR "Syntax error in your configuration\n"; + } + elsif( $res == UNKNOWN_ERROR ) { + print STDERR "Unknown error\n"; + } + } +} +else { + print STDERR "Configuration not changed\n"; +} + +unlink $editFile; +unlink $refFile; + +sub quit { + unlink $editFile; + unlink $refFile; + print STDERR "$_[0]\n"; + exit 1; +} diff --git a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm index ef7c14c96..42389de2e 100644 --- a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm +++ b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm @@ -16,7 +16,7 @@ use MIME::Base64; our @ISA = qw(Lemonldap::NG::Manager::Base); -our $VERSION = '0.63'; +our $VERSION = '0.64'; sub new { my ( $class, $args ) = @_; diff --git a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm index 7f08ef24c..bbe231c73 100644 --- a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm +++ b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm @@ -195,7 +195,7 @@ getConf returns all (C