Skip to content

Commit

Permalink
set Message-Authenticator to zero each time we send a packet. Fixes #96
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Jul 25, 2024
1 parent 59ece12 commit 7af6228
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pam_radius_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,7 @@ static int talk_radius(radius_conf_t *conf, AUTH_HDR *request, AUTH_HDR *respons
}

if (request->code == PW_ACCESS_REQUEST) {
memset(conf->message_authenticator, 0, AUTH_VECTOR_LEN);
hmac_md5(conf->message_authenticator, (uint8_t *) request, ntohs(request->length),
(const uint8_t *) server->secret, strlen(server->secret));

Expand Down

0 comments on commit 7af6228

Please sign in to comment.