Skip to content

Commit

Permalink
saslserv/main: Fix use after free during impersonation
Browse files Browse the repository at this point in the history
  • Loading branch information
mniip authored and siniStar7 committed Feb 6, 2017
1 parent 257eca5 commit f0a7cff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/saslserv/main.c
Expand Up @@ -648,9 +648,11 @@ static myuser_t *login_user(sasl_session_t *p)

logcommand(si, CMDLOG_LOGIN, "allowed IMPERSONATE by \2%s\2 to \2%s\2", entity(source_mu)->name, entity(target_mu)->name);

req.si = sasl_sourceinfo_create(p);
req.mu = target_mu;
req.allowed = true;
hook_call_user_can_login(&req);
object_unref(req.si);
if (!req.allowed)
{
logcommand(si, CMDLOG_LOGIN, "failed LOGIN to \2%s\2 (denied by hook)", entity(target_mu)->name);
Expand Down

0 comments on commit f0a7cff

Please sign in to comment.