winbind_nss_aix.c: Cannot set process credentials

Gerald (Jerry) Carter jerry at
Mon Feb 26 03:04:59 GMT 2007

Hash: SHA1

tridge at wrote:
> Jerry,
>  > I figured it out.  Was a combination of not advertising
>  > the necessary user attributes and bad memory allocations.
>  > I'll post a patch once I clean things up some more.
> Glad you've found it! 
> If you want to do more testing of it, you might find this useful:
> I'm not sure if the method that is failing here is one of the ones
> that uess_test.c tests (did you work out what method call is
> failing?). Perhaps we need to expand uess_test.c to include a wider
> range of tests?
> If you suspect a memory problem, then this code;
> could be useful. It demonstrates a memory leak in 
> the uess system on aix. I reported it to the AIX libc
> maintainers, but haven't heard if its been fixed or not.

Thanks for the links.  I'm not entirely sure if what I did
technically correct.  The docs on the LAM interface are
really thin. :-\  What finally worked was to set the
normal attributes like "id" in the getattrlist() method.
But once I started returning multiple attreibuets in the
returned array, I was getting segfaults I think from how
the memory was being allocated.

The main question I have is why is the returned memory
chunk allocated as one buffer instead of the pointer array
and a malloc() for each attrval_t struct ?

Any information or sample code (other than our own)
would be helpful.

cheers, jerry
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla -


More information about the samba-technical mailing list