Check if schema can be fetched
authorJamie Cameron <jcameron@webmin.com>
Sat, 29 Nov 2008 00:58:30 +0000 (00:58 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sat, 29 Nov 2008 00:58:30 +0000 (00:58 +0000)
ldap-useradmin/CHANGELOG
ldap-useradmin/index.cgi
ldap-useradmin/lang/en

index 2e435b4..9831f34 100644 (file)
@@ -63,3 +63,4 @@ The order of the first name and surname in the real name can be changed by a new
 Coverted all pages to use the new Webmin UI library, for a more consistent look. Also updated the groups chooser to use a left-right selector.
 ---- Changes since 1.440 ----
 Added a Module Config option to allow / as an IMAP folder separator, thanks to Bas van den Heuvel.
+Added a check on the module's main page to ensure that the LDAP schema is accessible.
index 2cf0a5f..6361c14 100755 (executable)
@@ -63,6 +63,14 @@ if (!ref($ldap)) {
        exit;
        }
 
+# Make sure we can get the schema
+$schema = $ldap->schema();
+if (!$schema) {
+       print &text('index_eschema', '../ldap-server/'),"<p>\n";
+       &ui_print_footer("/", $text{'index'});
+       exit;
+       }
+
 if ($config{'imap_host'}) {
        # Make sure the IMAP Perl module is installed, and if not offer
        # to install
index 767d139..d600478 100644 (file)
@@ -5,6 +5,7 @@ index_ehost=If no LDAP NSS configuration file is set in the <a href='$1'>module
 index_eperl=The $1 Perl module that this module requires is not installed or is not working properly. <a href='$2'>Click here</a> to have it downloaded and installed now.
 index_eperl2=The error reported by Perl when trying to load the module was :
 index_eldap=$1. Maybe your <a href='$2'>module configuration</a> is incorrect.
+index_eschema=Webmin has connected to the LDAP server, but failed to fetch the schema. Make sure that access has not been denied in the <a href='$1'>LDAP Server</a> module.
 index_eimap=$1. Maybe your <a href='$2'>module configuration</a> is incorrect.
 index_emd5=This module has been <a href='$1'>configured</a> to use MD5 encryption for passwords, but the $2 Perl module is not installed. <a href='$3'>Click here</a> to have the $2 module downloaded and installed.
 index_eslappasswd=This module has been <a href='$1'>configured</a> to use LDAP MD5 encryption for passwords, but the program <tt>$2</tt> used for encrypting a password is not installed.