winbind_nss_aix.c: Cannot set process credentials

tridge at tridge at
Mon Feb 26 03:51:13 GMT 2007


 > Thanks for the links.  I'm not entirely sure if what I did
 > technically correct.

I can't see a patch/commit from you on this - did I miss it? I'd be
happy to look at it if you send it my way. (although I might have to
scrounge around for an AIX box to test on).

 > The docs on the LAM interface are
 > really thin. :-\

yep, the docs are by no means complete. They are particularly bad on
how memory allocation is supposed to work. I found that even within
the modules supplied with AIX there are differences in how memory
is handled (eg. the LDAP and core uess modules). That is part of what
uess_leak.c demonstrates - you get different results for a ldap user
and a local user.

 >  What finally worked was to set the
 > normal attributes like "id" in the getattrlist() method.

that's strange - I was under the impression that method_attrlist
should only return "extra" attributes (which is why I only put "SID"
in there). 

 > But once I started returning multiple attreibuets in the
 > returned array, I was getting segfaults I think from how
 > the memory was being allocated.

I'd need to see the patch I think

 > 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 ?

nss_ldap does it the same way. I'm not sure if I got the idea from
nss_ldap or if I did tests against the standard AIX modules.

If I did get it from nss_ldap, then it would be worth writing a test
that loaded a standard AIX module (say the ldap module) and called the
method_attrlist then checked to see if the returned memory is one
chunk or not (just from the pointer values).

Cheers, Tridge

More information about the samba-technical mailing list