From: Micah Andersen Date: Fri, 1 Dec 2017 04:35:55 +0000 (-0500) Subject: Minor fix + Output result code in externalgroup_check_authorization() error message X-Git-Tag: mod_authnz_external-3.3.3~12^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=637629cd20dd3670c0cd30c2517dd0233f0c6a66;p=apache-authnz-external Minor fix + Output result code in externalgroup_check_authorization() error message -t and w are never used in externalfilegroup_check_authorization(), so removed. -externalgroup_check_authorization() now logs the last failing result code along with the 'User not in Required group.' message. -code is initialized to 0 to prevent a compiler warning. --- diff --git a/mod_authnz_external/mod_authnz_external.c b/mod_authnz_external/mod_authnz_external.c index 995e8e3..0a600ed 100644 --- a/mod_authnz_external/mod_authnz_external.c +++ b/mod_authnz_external/mod_authnz_external.c @@ -640,7 +640,7 @@ static authz_status externalgroup_check_authorization(request_rec *r, char *extname= dir->group_name; const char *extpath, *extmethod; const char *t, *w; - int code; + int code = 0; if (dir->authncheck){ /* If no authenticated user, pass */ @@ -682,8 +682,8 @@ static authz_status externalgroup_check_authorization(request_rec *r, ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "Authorization of user %s to access %s failed. " - "User not in Required group.", - r->user, r->uri); + "User not in Required group. Last result code: %i", + r->user, r->uri, code); return AUTHZ_DENIED; } @@ -704,7 +704,6 @@ static authz_status externalfilegroup_check_authorization(request_rec *r, char *extname= dir->group_name; const char *extpath, *extmethod; const char *filegroup= NULL; - const char *t, *w; int code; if (dir->authncheck){