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.