Winbind on AIX, again, with some (very little) code this time

Roylance, Stephen D. SROYLANCE at PARTNERS.ORG
Mon Mar 24 22:32:42 GMT 2003


In my quest to get winbind working on AIX I've found IBM's documentation on the
AIX loadable auth module API here:
http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/kernextc/sec_l
oad_mod.htm#secloadmod6600bkm1
and also discovered that the PADL LDAP NSS project
((http://www.padl.com/OSS/nss_ldap.html)) has a working AIX LDAP auth module.  I
started working on a winbind AIX module, it currently has no functionality, but
does build into a working module.  There is a lot more to the API, but these 5
methods are the least required for a module that only supports identification.
Use the command: gcc -o WINBIND winbind_aix.c -lsys -lcsys -lc -Xlinker -bM:SRE
-Xlinker -ewb_aix_init to build

The file is winbind_aix.c:

#include <stdlib.h>
#include <string.h>
#include <usersec.h>

/* #include "winbind_client.h" */


static struct group *
wb_aix_getgrgid (gid_t gid)
{
/* take a group id and return a filled struct group */
   return NULL; 
}

static struct group *
wb_aix_getgrnam (const char *name)
{
/* take a group name and return a filled struct group */
      return NULL;
}

static char *
wb_aix_getgrset (const char *user)
{
/* take a username and return a comma-separated list of groups names to which
the user belongs */
      return NULL;
}

static struct passwd *
wb_aix_getpwuid (uid_t uid)
{
/* take a uid and return a filled struct passwd */
      return NULL;
}

static struct passwd *
wb_aix_getpwnam (const char *name)
{
/* take a username and return a filled struct passwd */
      return NULL;
}

int
wb_aix_init (struct secmethod_table *methods)
{
    memset(methods, 0, sizeof(*methods));
    
    /* identification methods */
    
    methods->method_getgrgid = wb_aix_getgrgid;
    methods->method_getgrnam = wb_aix_getgrnam;
    methods->method_getgrset = wb_aix_getgrset;
    methods->method_getpwnam = wb_aix_getpwnam;
    methods->method_getpwuid = wb_aix_getpwuid;
    
    /* support methods 
    methods->method_open = wb_aix_open;
    methods->method_close = wb_aix_close;
    */
    
    return AUTH_SUCCESS;
}

I'm struggling through winbind_nss.c and friends to attempt constructing
something like what winbind_nss_solaris.c does for Sun.
Thanks for looking,
Steve Roylance


More information about the samba-technical mailing list