Author: tpot Date: 2004-10-01 02:57:10 +0000 (Fri, 01 Oct 2004) New Revision: 2759
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=2759&nolog=1 Log: Fix for winbindd on AIX 5.1. Apparently it doesn't have as many methods in struct secmethod_table as AIX 5.2. Patch from The Written Word. Modified: branches/SAMBA_3_0/source/configure.in branches/SAMBA_3_0/source/nsswitch/winbind_nss_aix.c trunk/source/configure.in trunk/source/nsswitch/winbind_nss_aix.c Changeset: Modified: branches/SAMBA_3_0/source/configure.in =================================================================== --- branches/SAMBA_3_0/source/configure.in 2004-09-30 16:08:09 UTC (rev 2758) +++ branches/SAMBA_3_0/source/configure.in 2004-10-01 02:57:10 UTC (rev 2759) @@ -4291,6 +4291,14 @@ AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),, [#include <pwd.h>]) +# AIX 4.3.x and 5.1 do not have as many members in +# struct secmethod_table as AIX 5.2 +AC_CHECK_MEMBERS([struct secmethod_table.method_attrlist], , , + [#include <usersec.h>]) +AC_CHECK_MEMBERS([struct secmethod_table.method_version], , , + [#include <usersec.h>]) + + ################################################# # Check to see if we should use the included popt Modified: branches/SAMBA_3_0/source/nsswitch/winbind_nss_aix.c =================================================================== --- branches/SAMBA_3_0/source/nsswitch/winbind_nss_aix.c 2004-09-30 16:08:09 UTC (rev 2758) +++ branches/SAMBA_3_0/source/nsswitch/winbind_nss_aix.c 2004-10-01 02:57:10 UTC (rev 2759) @@ -741,6 +741,7 @@ return; } +#ifdef HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST /* return a list of additional attributes supported by the backend */ @@ -764,6 +765,7 @@ return ret; } +#endif /* @@ -977,7 +979,9 @@ { ZERO_STRUCTP(methods); +#ifdef HAVE_STRUCT_SECMETHOD_TABLE_METHOD_VERSION methods->method_version = SECMETHOD_VERSION_520; +#endif methods->method_getgrgid = wb_aix_getgrgid; methods->method_getgrnam = wb_aix_getgrnam; @@ -997,7 +1001,9 @@ methods->method_passwdrestrictions = wb_aix_passwdrestrictions; methods->method_getgracct = wb_aix_getgracct; methods->method_getgrusers = wb_aix_getgrusers; +#ifdef HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST methods->method_attrlist = wb_aix_attrlist; +#endif #if LOG_UNIMPLEMENTED_CALLS methods->method_delgroup = method_delgroup; Modified: trunk/source/configure.in =================================================================== --- trunk/source/configure.in 2004-09-30 16:08:09 UTC (rev 2758) +++ trunk/source/configure.in 2004-10-01 02:57:10 UTC (rev 2759) @@ -4297,6 +4297,14 @@ AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),, [#include <pwd.h>]) +# AIX 4.3.x and 5.1 do not have as many members in +# struct secmethod_table as AIX 5.2 +AC_CHECK_MEMBERS([struct secmethod_table.method_attrlist], , , + [#include <usersec.h>]) +AC_CHECK_MEMBERS([struct secmethod_table.method_version], , , + [#include <usersec.h>]) + + ################################################# # Check to see if we should use the included popt Modified: trunk/source/nsswitch/winbind_nss_aix.c =================================================================== --- trunk/source/nsswitch/winbind_nss_aix.c 2004-09-30 16:08:09 UTC (rev 2758) +++ trunk/source/nsswitch/winbind_nss_aix.c 2004-10-01 02:57:10 UTC (rev 2759) @@ -741,6 +741,7 @@ return; } +#ifdef HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST /* return a list of additional attributes supported by the backend */ @@ -764,6 +765,7 @@ return ret; } +#endif /* @@ -977,7 +979,9 @@ { ZERO_STRUCTP(methods); +#ifdef HAVE_STRUCT_SECMETHOD_TABLE_METHOD_VERSION methods->method_version = SECMETHOD_VERSION_520; +#endif methods->method_getgrgid = wb_aix_getgrgid; methods->method_getgrnam = wb_aix_getgrnam; @@ -997,7 +1001,9 @@ methods->method_passwdrestrictions = wb_aix_passwdrestrictions; methods->method_getgracct = wb_aix_getgracct; methods->method_getgrusers = wb_aix_getgrusers; +#ifdef HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST methods->method_attrlist = wb_aix_attrlist; +#endif #if LOG_UNIMPLEMENTED_CALLS methods->method_delgroup = method_delgroup;