Author: rhafer Date: Mon Oct 27 16:11:26 2008 New Revision: 52596 URL: http://svn.opensuse.org/viewcvs/yast?rev=52596&view=rev Log: Fixed check for existing default ppolicy (bnc#439188) Modified: trunk/ldap-server/src/LdapServer.pm Modified: trunk/ldap-server/src/LdapServer.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/LdapServer.pm?rev=52596&r1=52595&r2=52596&view=diff ============================================================================== --- trunk/ldap-server/src/LdapServer.pm (original) +++ trunk/ldap-server/src/LdapServer.pm Mon Oct 27 16:11:26 2008 @@ -437,11 +437,11 @@ y2error( $ldapERR->{'code'}." : ".$ldapERR->{'msg'}); return undef; } - my @entries = SCR->Read (".ldap.search", { "base_dn" => $ppolicy->{'dn'}, + my $entries = SCR->Read (".ldap.search", { "base_dn" => $ppolicy->{'dn'}, "filter" => "objectclass=*", "scope" => 0 } ); my $path = ".ldap.add"; - if ( scalar(@entries) > 0 ) + if ( defined $entries && scalar(@{$entries}) > 0 ) { $path = ".ldap.modify" } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org