Merge branch 'encode' into future
[licom.git] / licom.cgi
index 70398b2..26c13a8 100755 (executable)
--- a/licom.cgi
+++ b/licom.cgi
@@ -69,7 +69,11 @@ our %Actions =
        save_group => [\&html_start, \&action_save_group, \&html_end]
 );
 
-read_config ();
+{
+       my @files = (qw(/etc/licom/licom.conf));
+       push (@files, './licom.conf') if (-r './licom.conf');
+       read_config (@files);
+}
 
 # make sure AuthLDAPRemoteUserIsDN is enabled.
 die unless ($ENV{'REMOTE_USER'});
@@ -96,7 +100,7 @@ if (!$UserID and $Action ne 'save')
 
 if (!$UserCN)
 {
-       die ("No such user in the LDAP directory: " . $ENV{'REMOTE_USER'});
+       die ("UserCN is not set. Make sure `AuthLDAPRemoteUserIsDN' in enabled.");
 }
 
 if (!defined ($Actions{$Action}))