[SSSD] [PATCH] Prevent segfault if vetoed_shells are specified without allowed_shells

Stephen Gallagher sgallagh at redhat.com
Mon Aug 8 13:06:23 UTC 2011


On Mon, 2011-08-08 at 16:01 +0300, Alexander Bokovoy wrote:
> On 08.08.2011 15:43, Jakub Hrozek wrote: > On Mon, Aug 08, 2011 at
> 06:02:45AM -0400, Alexander Bokovoy wrote: >> Hi, >> >> seems OK but
> could you also add similar treatment for etc_shells? There are few rare
> cases when out of memory situations could make nctx->etc_shells NULL.
> >> > > We handle OOM when loading the etc_shells array but more checks
> never > hurt, I guess. Yes, we do, by not modifying freshly allocated
> nctx->etc_shells. So its value is left zeroed because nctx is created
> with talloc_zero(). This case should be then picked up through a
> backchain in main() and cause exiting.
> 
> Also, we do allocate tmpctx in nss_get_config() but never use it. Is
> this an overlook from some past or there is intentional check for being
> able to allocate off nctx?

Hmm, good catch. It's unrelated to this patch, but you're right. We're
no longer using tmpctx there at all. Best to eliminate it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20110808/663008d2/attachment.sig>


More information about the sssd-devel mailing list