From b69352d2aad1f7578c1ff0400e14c657f8db0944 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Thu, 23 Oct 2014 14:03:04 +0200 Subject: [PATCH] Fixed LDAP issues --- Makefile | 2 +- src/auth.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 51bd0302..738da9ac 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ USE_SSL = 1 USE_KRB5 = 0 # flag for LDAP support, please turn on if you need LDAP -USE_LDSP = 0 +USE_LDAP = 0 ############################################################# diff --git a/src/auth.c b/src/auth.c index edd20ce9..03fde985 100644 --- a/src/auth.c +++ b/src/auth.c @@ -486,8 +486,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) { - status = get_user_line(lbs, user, NULL, NULL, NULL, NULL, NULL, &inactive); - if (status == 2) { + if (get_user_line(lbs, 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); }