Index: mozilla/webtools/bugzilla/checksetup.pl =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v retrieving revision 1.552 diff -up -r1.552 mozilla/webtools/bugzilla/checksetup.pl --- mozilla/webtools/bugzilla/checksetup.pl +++ mozilla/webtools/bugzilla/checksetup.pl @@ -179,6 +179,14 @@ fix_all_file_permissions(!$silent); check_graphviz(!$silent) if Bugzilla->params->{'webdotbase'}; ########################################################################### +# Check LDAP setup +########################################################################### + +# Some people don't completely configure LDAP and then don't understand +# why it doesn't work. This is an attempt to recognize such problems. +check_ldap(!$silent); + +########################################################################### # Changes to the fielddefs --TABLE-- ########################################################################### Index: mozilla/webtools/bugzilla/Bugzilla/Install/Requirements.pm =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/Requirements.pm,v retrieving revision 1.35 diff -up -r1.35 mozilla/webtools/bugzilla/Bugzilla/Install/Requirements.pm --- mozilla/webtools/bugzilla/Bugzilla/Install/Requirements.pm +++ mozilla/webtools/bugzilla/Bugzilla/Install/Requirements.pm @@ -36,6 +36,7 @@ our @EXPORT = qw( check_requirements check_graphviz + check_ldap have_vers install_command ); @@ -460,6 +461,23 @@ sub check_graphviz { return $return; } +sub check_ldap { + my ($output) = @_; + + return 1 unless (Bugzilla->params->{'LDAPserver'} && + Bugzilla->params->{'LDAPBaseDN'}); + + print "Checking for incomplete LDAP configuration\n" if $output; + + unless (Bugzilla->params->{'user_verify_class'} =~ /LDAP/) { + print "There seems to be an attempt to configure LDAP,\n"; + print "but user_verify_class doesn't include it.\n"; + print "http://www.bugzilla.org/docs/tip/html/extraconfig.html#bzldap\n"; + } + + return 1; +} + # This was originally clipped from the libnet Makefile.PL, adapted here to # use the below vers_cmp routine for accurate version checking. sub have_vers { @@ -627,6 +645,16 @@ Params: C<$output> - C<$true> if yo Returns: C<1> if the check was successful, C<0> otherwise. +=item C + +Description: Checks if most LDAP variables are set, LDAP is + reachable, but LDAP isn't configured for use. + +Params: C<$output> - C<$true> if you want the function to + print out information about what it's doing. + +Returns: C<1> if the check was successful, C<0> otherwise. + =item C Description: Tells you whether or not you have the appropriate