winbind_nss_aix.c: Cannot set process credentials

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

tridge at samba.org 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:
> 
>   http://junkcode.samba.org/ftp/unpacked/junkcode/uess_test.c
> 
> 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;
> 
>   http://junkcode.samba.org/ftp/unpacked/junkcode/uess_leak.c
> 
> 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF4k5bIR7qMdg1EfYRAu/zAKDfPoeFC0UTKoGbfiGukfJ8jmui2wCeKgQ7
e0Oi3uyNgHkzXrpuGX+OuPw=
=QHhH
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list