Hello community,
here is the log from the commit of package yast2-ldap-server
checked in at Mon Sep 29 18:27:40 CEST 2008.
--------
--- yast2-ldap-server/yast2-ldap-server.changes 2008-09-24 14:11:49.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-ldap-server/yast2-ldap-server.changes 2008-09-29 13:56:33.000000000 +0200
@@ -1,0 +2,8 @@
+Mon Sep 29 13:03:41 CEST 2008 - rhafer@suse.de
+
+- Version 2.17.8
+ * revived AutoYaST support (bnc#429528)
+ * Additional fix for installation proposal. Don't propose
+ configuration if openldap2 is not installed (bnc#426593)
+
+-------------------------------------------------------------------
Old:
----
yast2-ldap-server-2.17.7.tar.bz2
New:
----
yast2-ldap-server-2.17.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ldap-server.spec ++++++
--- /var/tmp/diff_new_pack.FI6154/_old 2008-09-29 18:27:26.000000000 +0200
+++ /var/tmp/diff_new_pack.FI6154/_new 2008-09-29 18:27:26.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-ldap-server (Version 2.17.7)
+# spec file for package yast2-ldap-server (Version 2.17.8)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-ldap-server
-Version: 2.17.7
+Version: 2.17.8
Release: 1
License: GPL v2 or later; X11/MIT
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-ldap-server-2.17.7.tar.bz2
+Source0: yast2-ldap-server-2.17.8.tar.bz2
Prefix: /usr
BuildRequires: boost-devel gcc-c++ libldapcpp-devel perl-Digest-SHA1 perl-X500-DN perl-gettext pkg-config update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-ldap-client
Requires: acl net-tools perl perl-Digest-SHA1 perl-gettext perl-X500-DN yast2 yast2-ca-management yast2-ldap-client yast2-perl-bindings yast2-users
@@ -41,7 +41,7 @@
Andreas Bauer
%prep
-%setup -n yast2-ldap-server-2.17.7
+%setup -n yast2-ldap-server-2.17.8
%build
%{prefix}/bin/y2tool y2autoconf
@@ -86,6 +86,11 @@
/usr/share/YaST2/scrconf/*
%doc %{prefix}/share/doc/packages/yast2-ldap-server
%changelog
+* Mon Sep 29 2008 rhafer@suse.de
+- Version 2.17.8
+ * revived AutoYaST support (bnc#429528)
+ * Additional fix for installation proposal. Don't propose
+ configuration if openldap2 is not installed (bnc#426593)
* Wed Sep 24 2008 rhafer@suse.de
- Version 2.17.7
* Fixed crashes and consistency checks for ACLs ((bnc#425821)
++++++ yast2-ldap-server-2.17.7.tar.bz2 -> yast2-ldap-server-2.17.8.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-server-2.17.7/configure new/yast2-ldap-server-2.17.8/configure
--- old/yast2-ldap-server-2.17.7/configure 2008-09-24 13:03:01.000000000 +0200
+++ new/yast2-ldap-server-2.17.8/configure 2008-09-29 13:09:06.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for yast2-ldap-server 2.17.7.
+# Generated by GNU Autoconf 2.63 for yast2-ldap-server 2.17.8.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -750,8 +750,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-ldap-server'
PACKAGE_TARNAME='yast2-ldap-server'
-PACKAGE_VERSION='2.17.7'
-PACKAGE_STRING='yast2-ldap-server 2.17.7'
+PACKAGE_VERSION='2.17.8'
+PACKAGE_STRING='yast2-ldap-server 2.17.8'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1529,7 +1529,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-ldap-server 2.17.7 to adapt to many kinds of systems.
+\`configure' configures yast2-ldap-server 2.17.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1601,7 +1601,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-ldap-server 2.17.7:";;
+ short | recursive ) echo "Configuration of yast2-ldap-server 2.17.8:";;
esac
cat <<\_ACEOF
@@ -1714,7 +1714,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-ldap-server configure 2.17.7
+yast2-ldap-server configure 2.17.8
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1728,7 +1728,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-ldap-server $as_me 2.17.7, which was
+It was created by yast2-ldap-server $as_me 2.17.8, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2575,7 +2575,7 @@
# Define the identity of the package.
PACKAGE='yast2-ldap-server'
- VERSION='2.17.7'
+ VERSION='2.17.8'
cat >>confdefs.h <<_ACEOF
@@ -2799,7 +2799,7 @@
-VERSION="2.17.7"
+VERSION="2.17.8"
RPMNAME="yast2-ldap-server"
MAINTAINER="Ralf Haferkamp "
@@ -22183,7 +22183,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-ldap-server $as_me 2.17.7, which was
+This file was extended by yast2-ldap-server $as_me 2.17.8, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22246,7 +22246,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-yast2-ldap-server config.status 2.17.7
+yast2-ldap-server config.status 2.17.8
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-server-2.17.7/configure.in new/yast2-ldap-server-2.17.8/configure.in
--- old/yast2-ldap-server-2.17.7/configure.in 2008-09-24 13:02:13.000000000 +0200
+++ new/yast2-ldap-server-2.17.8/configure.in 2008-09-29 13:08:47.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-ldap-server, 2.17.7, http://bugs.opensuse.org/, yast2-ldap-server)
+AC_INIT(yast2-ldap-server, 2.17.8, http://bugs.opensuse.org/, yast2-ldap-server)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.17.7"
+VERSION="2.17.8"
RPMNAME="yast2-ldap-server"
MAINTAINER="Ralf Haferkamp "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-server-2.17.7/src/agent/SlapdConfigAgent.cc new/yast2-ldap-server-2.17.8/src/agent/SlapdConfigAgent.cc
--- old/yast2-ldap-server-2.17.7/src/agent/SlapdConfigAgent.cc 2008-09-24 12:57:37.000000000 +0200
+++ new/yast2-ldap-server-2.17.8/src/agent/SlapdConfigAgent.cc 2008-09-29 13:08:17.000000000 +0200
@@ -238,6 +238,7 @@
else if ( path->component_str(0) == "initDatabases" )
{
YCPList dbList = arg->asList();
+ databases.clear();
for ( int i = 0; i < dbList->size(); i++ )
{
YCPMap dbMap = dbList->value(i)->asMap();
@@ -535,6 +536,8 @@
YCPString( (*i)->getStringValue("olcSuffix") ));
resMap.add( YCPString("rootdn"),
YCPString( (*i)->getStringValue("olcRootDn") ));
+ resMap.add( YCPString("rootpw"),
+ YCPString( (*i)->getStringValue("olcRootPw") ));
if ( dbtype == "bdb" || dbtype == "hdb" )
{
boost::shared_ptr<OlcBdbDatabase> bdb =
@@ -718,12 +721,7 @@
const YCPValue &arg,
const YCPValue &opt)
{
- if ( path->length() !=1 )
- {
- y2milestone("Unsupported Path: %s", path->toString().c_str() );
- return YCPNull();
- }
- else if ( path->component_str(0) == "attributeTypes" )
+ if ( path->component_str(0) == "attributeTypes" )
{
if ( schema.size() == 0 )
{
@@ -775,6 +773,30 @@
}
return resMap;
}
+ else if ( path->component_str(0) == "ldif" )
+ {
+ std::string name = path->component_str(1);
+ if ( schema.size() == 0 )
+ {
+ schema = olc.getSchemaNames();
+ }
+ OlcSchemaList::const_iterator i;
+ YCPMap resMap;
+ std::string result = "";
+ for (i = schema.begin(); i != schema.end(); i++ )
+ {
+ if ( (*i)->getName() == name )
+ {
+ ostringstream oldifstr;
+ LdifWriter oldif(oldifstr);
+ oldif.writeRecord((*i)->getChangedEntry());
+ result = oldifstr.str();
+ break;
+ }
+ }
+ return YCPString( result.c_str() );
+ }
+ y2milestone("Unsupported Path: %s", path->toString().c_str() );
return YCPNull();
}
@@ -1226,8 +1248,12 @@
{
boost::shared_ptr<OlcAccess> acl( new OlcAccess() );
+ YCPMap target;
// create the "to dn.<scope>=<dn> ...." part of the ACL
- YCPMap target = argList->value(j)->asMap()->value(YCPString("target"))->asMap();
+ if (! argList->value(j)->asMap()->value(YCPString("target")).isNull() )
+ {
+ target = argList->value(j)->asMap()->value(YCPString("target"))->asMap();
+ }
if (target.size() == 0 )
{
acl->setFilter("");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-server-2.17.7/src/config/ldap-server.rnc new/yast2-ldap-server-2.17.8/src/config/ldap-server.rnc
--- old/yast2-ldap-server-2.17.7/src/config/ldap-server.rnc 2008-01-08 12:12:15.000000000 +0100
+++ new/yast2-ldap-server-2.17.8/src/config/ldap-server.rnc 2008-09-29 13:08:17.000000000 +0200
@@ -2,52 +2,85 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace config = "http://www.suse.com/1.0/configns"
+#start = element profile { ldap-server }
+#include '/usr/share/YaST2/schema/autoyast/rnc/common.rnc'
ldap-server = element ldap-server {
- element allowList {
- LIST,
- element listentry { text }*
- }? &
- element commonServerCertificateAvailable { text }? &
- element configureCommonServerCertificate { text }? &
- element tlsSettings {
- element TLSCertificateKeyFile { text }? &
- element TLSCertificateFile { text }? &
- element TLSCACertificateFile { text }? &
- element TLSCACertificatePath { text }?
+ element daemon {
+ element listeners {
+ LIST,
+ element listentry { text }+
+ }? &
+ element serviceEnabled { BOOLEAN }? &
+ element slp { BOOLEAN }?
}? &
- element database {
+ element databases {
LIST,
element listentry {
- element cachesize { text }? &
- element checkpoint { text }? &
- element createdatabasedir { text }? &
- element cryptmethod { text }? &
- element database { text }? &
- element directory { text }? &
- element overlay {
+ element access {
LIST,
element listentry {
- LIST,
- element listentry { Anything }*
+ element access {
+ LIST,
+ element listentry {
+ element level { text } &
+ element type { text } &
+ element value { text }?
+ }+
+ }+ &
+ element target {
+ element attrs { text }? &
+ element filter { text }? &
+ element dn {
+ element style { text }? &
+ element value { text }?
+ }?
+ }?
}*
+ }* &
+ element indexes { Anything }* &
+ element checkpoint {
+ LIST,
+ element listentry { text }+
}? &
- element passwd { text }? &
- element ppolicy_default_changed { text }? &
+ element directory { text }? &
+ element entrycache { text }? &
+ element idlcache { text }? &
element rootdn { text }? &
- element suffix { text }?
+ element rootpw { text }? &
+ element suffix { text }? &
+ element type { text }?
}*
}? &
- element loglevel { text }? &
- element schemaIncludeList {
- LIST,
- element listentry { text }*
+ element globals {
+ element allow {
+ LIST,
+ element listentry { text }*
+ }? &
+ element disallow {
+ LIST,
+ element listentry { text }*
+ }? &
+ element loglevel {
+ LIST,
+ element listentry { text }*
+ }? &
+ element tlsconfig {
+ element caCertDir { text }? &
+ element caCertFile { text }? &
+ element certFile { text }? &
+ element certKeyFile { text }? &
+ element crlCheck { text }? &
+ element crlFile { text }? &
+ element verifyClient { text }?
+ }?
}? &
- element serviceEnabled { text }? &
- element importCertificates {
- element CACertificatesFile { text }? &
- element ServerCertificateFile { text }? &
- element ServerKeyFile { text }?
+ element schema {
+ LIST,
+ element listentry {
+ element includeldif { text }? &
+ element includeschema { text }?
+ }*
}?
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-server-2.17.7/src/ldap-server_auto.ycp new/yast2-ldap-server-2.17.8/src/ldap-server_auto.ycp
--- old/yast2-ldap-server-2.17.7/src/ldap-server_auto.ycp 2008-09-18 15:50:25.000000000 +0200
+++ new/yast2-ldap-server-2.17.8/src/ldap-server_auto.ycp 2008-09-29 13:08:17.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Client for autoinstallation
* Authors: Andreas Bauer
*
- * $Id: ldap-server_auto.ycp 51284 2008-09-18 13:50:25Z rhafer $
+ * $Id: ldap-server_auto.ycp 51476 2008-09-24 14:55:34Z rhafer $
*
* This is a client for autoinstallation. It takes its arguments,
* goes through the configuration and return the setting.
@@ -39,7 +39,7 @@
if(size(WFM::Args()) > 1 && is(WFM::Args(1), map))
param = (map) WFM::Args(1);
}
-y2debug("func=%1", func);
+y2milestone("func=%1", func);
y2debug("param=%1", param);
/* Create a summary*/
@@ -54,6 +54,7 @@
/* Change configuration (run AutoSequence) */
else if (func == "Change") {
ret = LdapServerAutoSequence();
+ LdapServer::ReadFromDefaults();
}
/* Import configuration */
else if (func == "Import") {
@@ -87,7 +88,7 @@
* return boolean
*/
else if (func == "GetModified") {
- ret = false;
+ ret = ! LdapServer::UseDefaults();
}
/**
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-server-2.17.7/src/LdapServer.pm new/yast2-ldap-server-2.17.8/src/LdapServer.pm
--- old/yast2-ldap-server-2.17.7/src/LdapServer.pm 2008-09-24 12:57:38.000000000 +0200
+++ new/yast2-ldap-server-2.17.8/src/LdapServer.pm 2008-09-29 13:08:17.000000000 +0200
@@ -4,7 +4,7 @@
# Summary: LdapServer settings, input and output functions
# Authors: Ralf Haferkamp , Andreas Bauer
#
-# $Id: LdapServer.pm 51443 2008-09-24 10:38:25Z rhafer $
+# $Id: LdapServer.pm 51556 2008-09-25 19:31:17Z rhafer $
#
# Representation of the configuration of ldap-server.
# Input and output routines.
@@ -134,7 +134,7 @@
]
}
];
-my @defaultIndexes = (
+my $defaultIndexes = [
{ "name" => "objectclass",
"eq" => YaST::YCP::Boolean(1)
},
@@ -170,7 +170,7 @@
"eq" => YaST::YCP::Boolean(1),
"sub" => YaST::YCP::Boolean(1)
}
- );
+ ];
my @schema = ();
@@ -228,10 +228,9 @@
{
# assume a changed config as we don't ship a default for back-config
$slapdConfChanged = 1;
- # How do we get the LDAP password?
- y2milestone("LDAP server is running. How should I connect?");
SCR->Execute('.ldapserver.init' );
my $rc = SCR->Read('.ldapserver.databases');
+ $usingDefaults = 0;
}
else
{
@@ -375,7 +374,7 @@
my $ldapERR;
my $db_auth = $self->ReadAuthInfo( $db );
- if ( defined $db_auth )
+ if ( keys( %$db_auth ) )
{
if (! SCR->Execute(".ldap.bind", {"bind_dn" => $db_auth->{'bind_dn'},
"bind_pw" => $db_auth->{'bind_pw'}}) ) {
@@ -573,7 +572,7 @@
chomp $tmpfile;
y2milestone("using tempfile: ".$tmpfile );
my $ldif = SCR->Read('.ldapserver.configAsLdif' );
- y2milestone($ldif);
+ y2debug($ldif);
$rc = SCR->Write('.target.string', $tmpfile, $ldif );
if ( $rc )
{
@@ -747,7 +746,96 @@
sub Import {
my $self = shift;
my $hash = shift;
+ y2milestone("LdapServer::Import() : ". Data::Dumper->Dump([$hash]));
+
+ if ( ! keys( %$hash ) )
+ {
+ $usingDefaults = 1;
+ $overwriteConfig = 0;
+ $self->WriteServiceEnabled( 0 );
+ return 1;
+ }
+ $usingDefaults = 0;
+ $overwriteConfig = 1;
+ $self->WriteServiceEnabled( $hash->{'daemon'}->{'serviceEnabled'} );
+ if ( ! $self->ReadServiceEnabled() )
+ {
+ return 1;
+ }
+ $self->WriteSLPEnabled( $hash->{'daemon'}->{'slp'} );
+ foreach my $listner (@{$hash->{'daemon'}->{'listners'} } )
+ {
+ $self->WriteProtocolListenerEnabled($listner, 1);
+ }
+
+ SCR->Execute('.ldapserver.initGlobals' );
+ if ( defined $hash->{'globals'}->{'loglevel'} )
+ {
+ $self->WriteLogLevels( $hash->{'globals'}->{'loglevel'} );
+ }
+ if ( defined $hash->{'globals'}->{'allow'} )
+ {
+ $self->WriteAllowFeatures( $hash->{'globals'}->{'allow'} );
+ }
+ if ( defined $hash->{'globals'}->{'disallow'} )
+ {
+ $self->WriteDisallowFeatures( $hash->{'globals'}->{'disallow'} );
+ }
+ if ( defined $hash->{'globals'}->{'tlsconfig'} )
+ {
+ $self->WriteTlsConfig( $hash->{'globals'}->{'tlsconfig'} = $self->ReadTlsConfig() );
+ }
+
+ SCR->Execute('.ldapserver.initSchema' );
+ foreach my $schema (@{$hash->{'schema'}})
+ {
+ if ( defined $schema->{'includeldif'} )
+ {
+ $self->AddLdifToSchemaList($schema->{'includeldif'});
+ }
+ elsif ( defined $schema->{'includeschema'} )
+ {
+ $self->AddSchemaToSchemaList($schema->{'includeschema'});
+ }
+ else # Import ldif string
+ {
+
+ }
+ }
+ my $cfgdatabase = { 'type' => 'config',
+ 'rootdn' => 'cn=config' };
+ my $frontenddb = { 'type' => 'frontend' };
+ SCR->Execute('.ldapserver.initDatabases', [ $frontenddb, $cfgdatabase ] );
+ SCR->Write(".ldapserver.database.{-1}.acl", $defaultGlobalAcls );
+ my $i = 1;
+ my $defIdxBak = $defaultIndexes;
+ $defaultIndexes = [];
+ my $defAclBak = $defaultDbAcls;
+ $defaultDbAcls = [];
+ foreach my $database (@{$hash->{'databases'}})
+ {
+ $self->AddDatabase($i, $database, 1);
+ foreach my $idx ( keys %{$database->{'indexes'}} )
+ {
+ my $idxHash = {
+ "name" => $idx,
+ "eq" => $database->{'indexes'}->{$idx}->{'eq'} || 0,
+ "sub" => $database->{'indexes'}->{$idx}->{'sub'} || 0,
+ "pres" => $database->{'indexes'}->{$idx}->{'pres'} || 0,
+ };
+ $self->ChangeDatabaseIndex( $i, $idxHash );
+ }
+ if ( defined $database->{'access'} )
+ {
+ $self->ChangeDatabaseAcl( $i, $database->{'access'} );
+ }
+ }
+ $defaultIndexes = $defIdxBak;
+ $defaultDbAcls = $defAclBak;
+
+ my $ldif = SCR->Read('.ldapserver.configAsLdif' );
+ y2milestone($ldif);
return 1;
}
@@ -761,7 +849,76 @@
my $self = shift;
my $hash = {};
+ if ( ! $self->ReadServiceEnabled() )
+ {
+ return $hash;
+ }
+
+ $hash->{'daemon'}->{'slp'} = $self->ReadSLPEnabled();
+ $hash->{'daemon'}->{'serviceEnabled'} = $self->ReadServiceEnabled();
+ my @listeners = ();
+ if ( $self->ReadProtocolListenerEnabled("ldap") )
+ {
+ push @listeners, "ldap";
+ }
+ if ( $self->ReadProtocolListenerEnabled("ldapi") )
+ {
+ push @listeners, "ldapi";
+ }
+ if ( $self->ReadProtocolListenerEnabled("ldaps") )
+ {
+ push @listeners, "ldaps";
+ }
+ $hash->{'daemon'}->{'listeners'} = \@listeners;
+
+ my @schema = ();
+ my $schemaList = $self->ReadSchemaList();
+
+ foreach my $schema (@$schemaList)
+ {
+ my $schemaDef = {};
+ # Don't include definitions of well know Schema shipping with the
+ # openldap2 RPMs
+ if ( $schema eq "core" || $schema eq "cosine" || $schema eq "inetorgperson" ||
+ $schema eq "nis" )
+ {
+ $schemaDef->{'includeldif'} = "/etc/openldap/schema/".$schema.".ldif";
+ }
+ elsif ( $schema eq "dnszone" || $schema eq "ppolicy" || $schema eq "rfc2307bis" ||
+ $schema eq "suse-mailserver" || $schema eq "yast" )
+ {
+ $schemaDef->{'includeschema'} = "/etc/openldap/schema/".$schema.".schema";
+ }
+ else
+ {
+ $schemaDef->{'name'} = $schema;
+ $schemaDef->{'definition'} = SCR->Read(".ldapserver.schema.ldif.$schema");
+ }
+ push @schema, $schemaDef;
+ }
+ $hash->{'schema'} = \@schema;
+ $hash->{'globals'}->{'loglevel'} = $self->ReadLogLevels();
+ $hash->{'globals'}->{'allow'} = $self->ReadAllowFeatures();
+ $hash->{'globals'}->{'disallow'} = $self->ReadDisallowFeatures();
+ $hash->{'globals'}->{'tlsconfig'} = $self->ReadTlsConfig();
+
+ my $dbList = $self->ReadDatabaseList();
+ my @dbs;
+ foreach my $db (@$dbList)
+ {
+ if ( $db->{'type'} eq "config" || $db->{'type'} eq "frontend" )
+ {
+ next;
+ }
+ my $dbhash = $self->ReadDatabase($db->{'index'} );
+ $dbhash->{'access'} = $self->ReadDatabaseAcl( $db->{'index'} );
+ $dbhash->{'indexes'} = $self->ReadDatabaseIndexes( $db->{'index'} );
+ push @dbs, $dbhash;
+ }
+ $hash->{'databases'} = \@dbs;
+
+ y2milestone("LdapServer::Export() ". Data::Dumper->Dump([$hash]));
return $hash;
}
@@ -773,15 +930,40 @@
sub Summary {
# Configuration summary text for autoyast
my $self = shift;
- my $defaults = $self->CreateInitialDefaults();
my $string;
+ if ( keys(%dbDefaults) && $usingDefaults )
+ {
+ $string .= '<h2>'._("Startup Configuration").'</h2>'
+ .'<p>'._("Start LDAP Server: ").'<code>'.($dbDefaults{'serviceEnabled'}->value?_("Yes"):_("No")).'</code></p>'
+ .'<p>'._("Register at SLP Service: ").'<code>'.($dbDefaults{'slpRegister'}->value?_("Yes"):_("No")).'</code></p>';
- $string .= '<h2>'._("Startup Configuration").'</h2>'
- .'<p>'._("Start LDAP Server: ").'<code>'.($defaults->{'serviceEnabled'}->value?_("Yes"):_("No")).'</code></p>'
- .'<p>'._("Register at SLP Service: ").'<code>'.($defaults->{'slpRegister'}->value?_("Yes"):_("No")).'</code></p>'
- .'<h2>'._("Create initial Database with the following Parameters").'</h2>'
- .'<p>'._("Database Suffix: ").'<code>'.$defaults->{'suffix'}.'</code></p>'
- .'<p>'._("Administrator DN: ").'<code>'.$defaults->{'rootdn'}.'</code></p>';
+ if ( $dbDefaults{'serviceEnabled'}->value )
+ {
+ $string .= '<h2>'._("Create initial Database with the following Parameters").'</h2>'
+ .'<p>'._("Database Suffix: ").'<code>'.$dbDefaults{'suffix'}.'</code></p>'
+ .'<p>'._("Administrator DN: ").'<code>'.$dbDefaults{'rootdn'}.'</code></p>';
+ }
+ }
+ elsif ( ! $usingDefaults )
+ {
+ my $dbList = $self->ReadDatabaseList();
+ $string .= '<h2>'._("Startup Configuration").'</h2>'
+ .'<p>'._("Start LDAP Server: ").'<code>'.($serviceEnabled?_("Yes"):_("No")).'</code></p>'
+ .'<p>'._("Register at SLP Service: ").'<code>'.($registerSlp?_("Yes"):_("No")).'</code></p>'
+ .'<h2>'._("Create the following databases:").'</h2>';
+ foreach my $db ( @$dbList )
+ {
+ if ($db->{'type'} ne "frontend" && $db->{'type'} ne "config" )
+ {
+ $string .= '<p>'._("Database Suffix: ").'<code>'.$db->{'suffix'}.'</code><br>'
+ ._("Database Type: ").'<code>'.$db->{'type'}.'</code></p>';
+ }
+ }
+ }
+ else
+ {
+ $string .= _("Not configured yet.");
+ }
return $string;
}
@@ -1089,6 +1271,7 @@
{
my $self = shift;
my $defaults = shift;
+ $self->WriteServiceEnabled( $defaults->{'serviceEnabled'} );
$defaults->{'serviceEnabled'} = YaST::YCP::Boolean($defaults->{'serviceEnabled'});
$defaults->{'slpRegister'} = YaST::YCP::Boolean($defaults->{'slpRegister'});
y2debug("SetInitialDefaults: ". Data::Dumper->Dump([$defaults]));
@@ -1129,7 +1312,7 @@
$dbDefaults{'idlcache'} = 30000;
$dbDefaults{'checkpoint'} = [ 1024, 5 ];
$dbDefaults{'defaultIndex'} = YaST::YCP::Boolean(1);
- $dbDefaults{'serviceEnabled'} = YaST::YCP::Boolean(0);
+ $dbDefaults{'serviceEnabled'} = YaST::YCP::Boolean(1);
$dbDefaults{'slpRegister'} = YaST::YCP::Boolean(0);
return 1;
}
@@ -1159,7 +1342,10 @@
sub ReadFromDefaults
{
my $self = shift;
-
+
+ $self->WriteServiceEnabled( $dbDefaults{'serviceEnabled'} );
+ $self->WriteSLPEnabled( $dbDefaults{'slpRegister'} );
+
my $pwHash = $self->HashPassword($dbDefaults{'pwenctype'}, $dbDefaults{'rootpw_clear'} );
my $database = { 'type' => 'hdb',
'suffix' => $dbDefaults{'suffix'},
@@ -1217,7 +1403,7 @@
SCR->Execute('.ldapserver.initDatabases', [ $frontenddb, $cfgdatabase, $database ] );
if ( $dbDefaults{'defaultIndex'} == 1 )
{
- foreach my $idx ( @defaultIndexes )
+ foreach my $idx ( @$defaultIndexes )
{
$self->ChangeDatabaseIndex(1, $idx );
}
@@ -1570,7 +1756,10 @@
}
}
my $rc;
- $db->{'rootpw'} = $self->HashPassword($db->{'pwenctype'}, $db->{'rootpw_clear'} );
+ if ( ! defined $db->{'rootpw'} )
+ {
+ $db->{'rootpw'} = $self->HashPassword($db->{'pwenctype'}, $db->{'rootpw_clear'} );
+ }
if ( $index == 0 )
{
# calculate new database index
@@ -1630,7 +1819,7 @@
return 0;
}
# default indexing
- foreach my $idx ( @defaultIndexes )
+ foreach my $idx ( @$defaultIndexes )
{
$self->ChangeDatabaseIndex($index, $idx );
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-server-2.17.7/src/ldap-server_proposal.ycp new/yast2-ldap-server-2.17.8/src/ldap-server_proposal.ycp
--- old/yast2-ldap-server-2.17.7/src/ldap-server_proposal.ycp 2008-09-18 12:19:00.000000000 +0200
+++ new/yast2-ldap-server-2.17.8/src/ldap-server_proposal.ycp 2008-09-29 13:08:17.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Proposal function dispatcher.
* Authors: Andreas Bauer
*
- * $Id: ldap-server_proposal.ycp 51267 2008-09-18 10:18:38Z rhafer $
+ * $Id: ldap-server_proposal.ycp 51630 2008-09-29 11:07:56Z rhafer $
*
* Proposal function dispatcher for ldap-server configuration.
* See source/installation/proposal/proposal-API.txt
@@ -65,6 +65,7 @@
LdapServer::WriteServiceEnabled( true );
}
defaults = LdapServer::CreateInitialDefaults();
+ defaults["serviceEnabled"] = LdapServer::ReadServiceEnabled();
defaults["rootpw_clear"] = Users::GetRootPassword();
LdapServer::SetInitialDefaults(defaults);
}
@@ -118,7 +119,7 @@
textdomain "ldap-server";
}
- proposal = _("LDAP Server Configuration:") + HTML::Newline() +
+ proposal = _("LDAP Server Configuration:") +
HTML::List( [ _("Base DN: ") + defaults["suffix"]:"",
_("Root DN: ") + defaults["rootdn"]:"",
_("LDAP Password: ") + rootPWString
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-server-2.17.7/src/wizards.ycp new/yast2-ldap-server-2.17.8/src/wizards.ycp
--- old/yast2-ldap-server-2.17.7/src/wizards.ycp 2008-09-18 12:19:00.000000000 +0200
+++ new/yast2-ldap-server-2.17.8/src/wizards.ycp 2008-09-29 13:08:17.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Wizards definitions
* Authors: Andreas Bauer
*
- * $Id: wizards.ycp 51194 2008-09-16 15:17:23Z rhafer $
+ * $Id: wizards.ycp 51476 2008-09-24 14:55:34Z rhafer $
*/
{
@@ -265,7 +265,7 @@
Wizard::SetContentsButtons(caption, contents, "",
Label::BackButton(), Label::NextButton());
- any ret = MainSequence();
+ any ret = InstProposalSequence();
UI::CloseDialog();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-server-2.17.7/VERSION new/yast2-ldap-server-2.17.8/VERSION
--- old/yast2-ldap-server-2.17.7/VERSION 2008-09-24 13:01:39.000000000 +0200
+++ new/yast2-ldap-server-2.17.8/VERSION 2008-09-29 13:08:17.000000000 +0200
@@ -1 +1 @@
-2.17.7
+2.17.8
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org