mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-12 19:33:03 +00:00
Fixed issues with LDAP, made it compile again
This commit is contained in:
parent
fc6679b57b
commit
338841043c
@ -14,7 +14,7 @@
|
|||||||
# Build options :
|
# Build options :
|
||||||
# Read: If neither macro exists, then add the default definition.
|
# Read: If neither macro exists, then add the default definition.
|
||||||
%{?_with_krb5: %define _with_krb5 USE_KRB5=1}
|
%{?_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_pam: %define _with_pam USE_PAM=1}
|
||||||
%{?_with_ssl: %define _with_ssl USE_SSL=1}
|
%{?_with_ssl: %define _with_ssl USE_SSL=1}
|
||||||
# Default build options are with SSL
|
# Default build options are with SSL
|
||||||
|
|||||||
@ -34,6 +34,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LDAP
|
#ifdef HAVE_LDAP
|
||||||
|
#define LDAP_DEPRECATED 1
|
||||||
#include <ldap.h>
|
#include <ldap.h>
|
||||||
|
|
||||||
LDAP *ldap_ld;
|
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),
|
// if user not in password file (external authentication!) and "LDAP register" is allowed (>0),
|
||||||
// obtain user info from LDAP and add locally
|
// obtain user info from LDAP and add locally
|
||||||
if (verified) {
|
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)
|
if (getcfg(lbs->name, "LDAP register", str, sizeof(str)) && atoi(str) > 0)
|
||||||
ldap_adduser_file(lbs, user, password, error_str, error_size);
|
ldap_adduser_file(lbs, user, password, error_str, error_size);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user