From: Stephan Bosch Date: Mon, 23 Oct 2023 23:34:57 +0000 (+0200) Subject: auth: auth-sasl-mech-apop - Obtain access to the auth request through the sasl request X-Git-Tag: 2.4.2~190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3af20163594066452457922e9c1a6f0bda1bb7d1;p=thirdparty%2Fdovecot%2Fcore.git auth: auth-sasl-mech-apop - Obtain access to the auth request through the sasl request --- diff --git a/src/auth/auth-sasl-mech-apop.c b/src/auth/auth-sasl-mech-apop.c index ef2d5adcdb..e7d12269c4 100644 --- a/src/auth/auth-sasl-mech-apop.c +++ b/src/auth/auth-sasl-mech-apop.c @@ -72,6 +72,10 @@ mech_apop_auth_initial(struct sasl_server_mech_request *req, { struct apop_auth_request *request = container_of(req, struct apop_auth_request, auth_request); + struct sasl_server_req_ctx *rctx = + sasl_server_request_get_req_ctx(req); + struct auth_request *auth_request = + container_of(rctx, struct auth_request, sasl.req); const unsigned char *tmp, *end, *username = NULL; unsigned long pid, connect_uid, timestamp; @@ -124,7 +128,7 @@ mech_apop_auth_initial(struct sasl_server_mech_request *req, if (sscanf(request->challenge, "<%lx.%lx.%lx.", &pid, &connect_uid, ×tamp) != 3 || - connect_uid != req->request->connect_uid || + connect_uid != auth_request->connect_uid || pid != (unsigned long)getpid() || (time_t)timestamp < process_start_time) { e_info(req->mech_event,