struct io *io;
struct timeout *to;
string_t *input;
+ char *username;
};
struct master_login {
if (close(pl->fd) < 0)
i_error("close(postlogin) failed: %m");
str_free(&pl->input);
+ i_free(pl->username);
i_free(pl);
}
i_error("fd_read(%s) failed: %m",
login->postlogin_socket_path);
- } else {
+ } else if (str_len(pl->input) > 0) {
i_error("fd_read(%s) failed: disconnected",
login->postlogin_socket_path);
+ } else {
+ i_info("Post-login script denied access to user %s",
+ pl->username);
}
master_login_client_free(&pl->client);
master_login_postlogin_free(pl);
pl = i_new(struct master_login_postlogin, 1);
pl->client = client;
+ pl->username = i_strdup(auth_args[0]);
pl->fd = fd;
pl->io = io_add(fd, IO_READ, master_login_postlogin_input, pl);
pl->to = timeout_add(MASTER_LOGIN_POSTLOGIN_TIMEOUT_MSECS,