[yast-commit] r49550 - in /trunk/ldap-server/src: LdapServer.pm tree_structure.ycp
Author: rhafer Date: Thu Jul 31 17:15:14 2008 New Revision: 49550 URL: http://svn.opensuse.org/viewcvs/yast?rev=49550&view=rev Log: honor protocol listener switches from sysconfig, support for configuring specific interfaces is still missing Modified: trunk/ldap-server/src/LdapServer.pm trunk/ldap-server/src/tree_structure.ycp Modified: trunk/ldap-server/src/LdapServer.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/LdapServer.pm?rev=49550&r1=49549&r2=49550&view=diff ============================================================================== --- trunk/ldap-server/src/LdapServer.pm (original) +++ trunk/ldap-server/src/LdapServer.pm Thu Jul 31 17:15:14 2008 @@ -38,6 +38,14 @@ my $registerSlp = 0; my $useLdapiForConfig = 0; my %dbDefaults = (); + +my $use_ldapi_listener = 0; +my $use_ldaps_listener = 0; +my $use_ldap_listener = 0; +my $ldapi_interfaces = ""; +my $ldaps_interfaces = ""; +my $ldap_interfaces = ""; + my @defaultIndexes = ( { "name" => "objectclass", "eq" => YaST::YCP::Boolean(1) @@ -146,6 +154,14 @@ $serviceRunning = $isRunning; y2milestone("IsRunning: " . $isRunning . " IsEnabled " . $isEnabled); + $use_ldapi_listener = ( "yes" eq SCR->Read('.sysconfig.openldap.OPENLDAP_START_LDAPI') ); + $ldapi_interfaces = SCR->Read('.sysconfig.openldap.OPENLDAP_LDAPI_INTERFACES'); + + $use_ldaps_listener = ( "yes" eq SCR->Read('.sysconfig.openldap.OPENLDAP_START_LDAPS') ); + $ldaps_interfaces = SCR->Read('.sysconfig.openldap.OPENLDAP_LDAPS_INTERFACES'); + + $use_ldap_listener = ( "yes" eq SCR->Read('.sysconfig.openldap.OPENLDAP_START_LDAP') ); + $ldap_interfaces = SCR->Read('.sysconfig.openldap.OPENLDAP_LDAP_INTERFACES'); Progress->NextStage(); my $configBackend = SCR->Read('.sysconfig.openldap.OPENLDAP_CONFIG_BACKEND'); @@ -1160,5 +1176,27 @@ return YaST::YCP::Boolean(1); } +BEGIN { $TYPEINFO {GetProtocolListenerEnabled} = ["function", "boolean", "string" ]; } +sub GetProtocolListenerEnabled +{ + my ( $self, $protocol ) = @_; + y2milestone("GetProtocolListenerEnabled $protocol (ldapi $use_ldapi_listener, ldaps $use_ldaps_listener, ldap $use_ldap_listener"); + if ( $protocol eq "ldap" ) + { + return $use_ldap_listener; + } + elsif ( $protocol eq "ldapi" ) + { + return $use_ldapi_listener; + } + elsif ( $protocol eq "ldaps" ) + { + return $use_ldaps_listener; + } + else + { + return 0; + } +} 1; # EOF Modified: trunk/ldap-server/src/tree_structure.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/tree_structure.ycp?rev=49550&r1=49549&r2=49550&view=diff ============================================================================== --- trunk/ldap-server/src/tree_structure.ycp (original) +++ trunk/ldap-server/src/tree_structure.ycp Thu Jul 31 17:15:14 2008 @@ -95,6 +95,30 @@ UI::ChangeWidget( `fr_listener, `Enabled, false ); UI::ChangeWidget( `fr_firewall, `Enabled, false ); } + if ( LdapServer::GetProtocolListenerEnabled("ldap") ) + { + UI::ChangeWidget( `cb_interface_ldap, `Value, true ); + } + else + { + UI::ChangeWidget( `cb_interface_ldap, `Value, false ); + } + if ( LdapServer::GetProtocolListenerEnabled("ldaps") ) + { + UI::ChangeWidget( `cb_interface_ldaps, `Value, true ); + } + else + { + UI::ChangeWidget( `cb_interface_ldaps, `Value, false ); + } + if ( LdapServer::GetProtocolListenerEnabled("ldapi") ) + { + UI::ChangeWidget( `cb_interface_ldapi, `Value, true ); + } + else + { + UI::ChangeWidget( `cb_interface_ldapi, `Value, false ); + } return true; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
rhafer@svn.opensuse.org