Skip to content

Conversation

@fidencio
Copy link
Contributor

@fidencio fidencio commented Nov 8, 2017

We've noticed some crashes that happened because netgr is already freed,
but the timeout handler is still called. In order to avoid that, let's
remove the timeout handler when enum_ctx is freed at other places.

Resolves: https://pagure.io/SSSD/sssd/issue/3523

Signed-off-by: Fabiano Fidêncio fidencio@redhat.com

@pbrezina
Copy link
Member

Ack. Just the commit message still talkes about enum_ctx which is not present on 1.14.

@fidencio
Copy link
Contributor Author

@pbrezina, thanks for the review. I've changed the commit message.

@fidencio
Copy link
Contributor Author

Adding "Accepted" label per @pbrezina's review.

tv = tevent_timeval_current_ofs(lifetime, 0);
te = tevent_add_timer(step_ctx->nctx->rctx->ev,
step_ctx->nctx->gctx, tv,
netgr, tv,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you decide to use netgr as a context?

IMHO it is cleaner to use struct nss_ctx instead of struct getent_ctx

@fidencio fidencio force-pushed the wip/nss_setnetgrent_timeout_1_14_patch branch from 67f739d to 9070d59 Compare November 13, 2017 17:35
@fidencio
Copy link
Contributor Author

Changes done, thanks for the review.

We've noticed some crashes that happened because gctx is already freed,
but the timeout handler is still called. In order to avoid that, let's
remove the timeout handler when nss_ctx is freed at other places.

Resolves: https://pagure.io/SSSD/sssd/issue/3523

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
@fidencio fidencio force-pushed the wip/nss_setnetgrent_timeout_1_14_patch branch from 9070d59 to f38e83a Compare November 13, 2017 18:07
@pbrezina
Copy link
Member

pbrezina commented Nov 14, 2017 via email

@lslebodn
Copy link
Contributor

lslebodn commented Nov 14, 2017 via email

@lslebodn
Copy link
Contributor

@pbrezina can it be pushed?

@pbrezina
Copy link
Member

You have already pushed version with netgr into 1.13 (#445). I don't think we need to have three different patches in three different sssd versions.

@lslebodn
Copy link
Contributor

lslebodn commented Nov 15, 2017 via email

@pbrezina
Copy link
Member

Ah, sorry, you haven't pushed it, just closed it. My bad. Having it on netgr context is safer and more correct in my opinion. But feel free to push it this way.

@lslebodn
Copy link
Contributor

sssd-1-14:

sssd-1-13:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants