1
0
Эх сурвалжийг харах

Resolves: bug 435774
Bug Description: Unhandled error during setup: Could not import LDIF file
Reviewed by: nkinder (Thanks!)
Branch: HEAD
Fix Description: This doesn't allow you to re-prompt for the file, but this will at least cause setup to output a sensible error message if it detects that the given LDIF file is not readable.
Platforms tested: Fedora 8, Fedora 9
Flag Day: no
Doc impact: no

Rich Megginson 17 жил өмнө
parent
commit
023a1e62b5

+ 4 - 1
ldap/admin/src/scripts/DSCreate.pm.in

@@ -467,8 +467,11 @@ sub initDatabase {
     if ($ldiffile =~ /none/i) {
         debug(1, "No ldif file or org entries specified - no initial database will be created\n");
         return ();
-    } elsif ($ldiffile && -f $ldiffile) {
+    } elsif ($ldiffile && ($ldiffile !~ /suggest/i)) {
         debug(1, "Loading initial ldif file $ldiffile\n");
+        if (! -r $ldiffile) {
+            return ('error_opening_init_ldif', $ldiffile);
+        }
     } elsif (($inf->{slapd}->{Suffix} =~ /^(.*?)=/) && $suffixTable{$1}) {
         my @errs;
         my $template = $inf->{General}->{prefix} . $suffixTable{$1};