Fixed issues with LDAP, made it compile again
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@
|
||||
# Build options :
|
||||
# Read: If neither macro exists, then add the default definition.
|
||||
%{?_with_krb5: %define _with_krb5 USE_KRB5=1}
|
||||
%{?_with_ldap: %define _with_ldap USE_LDAP=0}
|
||||
%{?_with_ldap: %define _with_ldap USE_LDAP=1}
|
||||
%{?_with_pam: %define _with_pam USE_PAM=1}
|
||||
%{?_with_ssl: %define _with_ssl USE_SSL=1}
|
||||
# Default build options are with SSL
|
||||
|
||||
+2
-1
@@ -34,6 +34,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LDAP
|
||||
#define LDAP_DEPRECATED 1
|
||||
#include <ldap.h>
|
||||
|
||||
LDAP *ldap_ld;
|
||||
@@ -590,7 +591,7 @@ int auth_verify_password(LOGBOOK * lbs, const char *user, const char *password,
|
||||
// if user not in password file (external authentication!) and "LDAP register" is allowed (>0),
|
||||
// obtain user info from LDAP and add locally
|
||||
if (verified) {
|
||||
if (get_user_line(lbs, user, NULL, NULL, NULL, NULL, NULL, NULL) == 2) {
|
||||
if (get_user_line(lbs, (char *)user, NULL, NULL, NULL, NULL, NULL, NULL) == 2) {
|
||||
if (getcfg(lbs->name, "LDAP register", str, sizeof(str)) && atoi(str) > 0)
|
||||
ldap_adduser_file(lbs, user, password, error_str, error_size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user