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?
--
/ Alexander Bokovoy