MCPcopy Create free account
hub / github.com/apache/httpd / expr_check_authorization

Function expr_check_authorization

modules/aaa/mod_authz_core.c:1106–1129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1104}
1105
1106static authz_status expr_check_authorization(request_rec *r,
1107 const char *require_line,
1108 const void *parsed_require_line)
1109{
1110 const char *err = NULL;
1111 const struct require_expr_info *info = parsed_require_line;
1112 int rc = ap_expr_exec(r, info->expr, &err);
1113
1114 if (rc < 0) {
1115 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02320)
1116 "Error evaluating expression in 'Require expr': %s",
1117 err);
1118 return AUTHZ_GENERAL_ERROR;
1119 }
1120 else if (rc == 0) {
1121 if (info->want_user)
1122 return AUTHZ_DENIED_NO_USER;
1123 else
1124 return AUTHZ_DENIED;
1125 }
1126 else {
1127 return AUTHZ_GRANTED;
1128 }
1129}
1130
1131static const authz_provider authz_expr_provider =
1132{

Callers

nothing calls this directly

Calls 1

ap_expr_execFunction · 0.85

Tested by

no test coverage detected