From: Arran Cudbard-Bell Date: Thu, 11 Apr 2024 21:24:14 +0000 (-0600) Subject: Return updated from rlm_ldap when we update things X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f798690b8570c56c4f82609434f85162fdf3222;p=thirdparty%2Ffreeradius-server.git Return updated from rlm_ldap when we update things --- diff --git a/src/modules/rlm_ldap/rlm_ldap.c b/src/modules/rlm_ldap/rlm_ldap.c index 8c16ac53ec7..502ffc5f447 100644 --- a/src/modules/rlm_ldap/rlm_ldap.c +++ b/src/modules/rlm_ldap/rlm_ldap.c @@ -27,7 +27,6 @@ * @copyright 2012 Alan DeKok (aland@freeradius.org) * @copyright 1999-2013 The FreeRADIUS Server Project. */ -#include "lib/util/value.h" RCSID("$Id$") USES_APPLE_DEPRECATED_API @@ -42,6 +41,7 @@ USES_APPLE_DEPRECATED_API #include #include +#include #include #include @@ -1685,6 +1685,12 @@ static unlang_action_t mod_authorize_resume(rlm_rcode_t *p_result, UNUSED int *p FALL_THROUGH; case LDAP_AUTZ_POST_DEFAULT_PROFILE: + /* + * Did we jump back her after applying the default profile? + */ + if (autz_ctx->status == LDAP_AUTZ_POST_DEFAULT_PROFILE) { + rcode = RLM_MODULE_UPDATED; + } /* * Apply a SET of user profiles. */ @@ -1739,7 +1745,10 @@ static unlang_action_t mod_authorize_resume(rlm_rcode_t *p_result, UNUSED int *p * After each profile has been applied, execution will restart here. * Start by clearing the previously used value. */ - TALLOC_FREE(autz_ctx->profile_value); + if (autz_ctx->profile_value) { + TALLOC_FREE(autz_ctx->profile_value); + rcode = RLM_MODULE_UPDATED; /* We're back here after applying a profile successfully */ + } if (autz_ctx->profile_values && autz_ctx->profile_values[autz_ctx->value_idx]) { unlang_action_t ret; @@ -1761,6 +1770,7 @@ static unlang_action_t mod_authorize_resume(rlm_rcode_t *p_result, UNUSED int *p break; } } + break; } finish: