diff --git a/src/main/auth.c b/src/main/auth.c index b6215aac4407..7b4cb2a7952a 100644 --- a/src/main/auth.c +++ b/src/main/auth.c @@ -796,10 +796,5 @@ int rad_authenticate(REQUEST *request) rad_authlog("Login OK", request, 1); } - /* - * Run the modules in the 'post-auth' section. - */ - result = rad_postauth(request); - return result; } diff --git a/src/main/process.c b/src/main/process.c index 53237de978cc..80fc0f7008a3 100644 --- a/src/main/process.c +++ b/src/main/process.c @@ -1087,6 +1087,10 @@ STATE_MACHINE_DECL(request_finish) if (vp) rad_postauth(request); } + if (request->reply->code == PW_AUTHENTICATION_ACK) { + rad_postauth(request); + } + /* * Send the reply here. */