Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory
cvs-int.fedora.redhat.com:/tmp/cvs-serv13491/ldapserver/ldap/admin/src/scripts
Modified Files:
DSCreate.pm.in
Log Message:
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
Index: DSCreate.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSCreate.pm.in,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- DSCreate.pm.in 14 Jul 2008 19:37:15 -0000 1.12
+++ DSCreate.pm.in 14 Jul 2008 23:16:47 -0000 1.13
@@ -467,8 +467,11 @@
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};