From 02c9b46fab46ab401a3cf6bb74c8260801c41032 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 1 Oct 2004 02:57:10 +0000 Subject: r2759: 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. (This used to be commit 4f8496ad626478c31e9372e07652d50f581256d0) --- source3/configure.in | 8 ++++++++ source3/nsswitch/winbind_nss_aix.c | 6 ++++++ 2 files changed, 14 insertions(+) (limited to 'source3') diff --git a/source3/configure.in b/source3/configure.in index 3eecc48b21..4c0f5396bd 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -4291,6 +4291,14 @@ AC_CHECK_MEMBER(struct passwd.pw_age, AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),, [#include ]) +# 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 ]) +AC_CHECK_MEMBERS([struct secmethod_table.method_version], , , + [#include ]) + + ################################################# # Check to see if we should use the included popt diff --git a/source3/nsswitch/winbind_nss_aix.c b/source3/nsswitch/winbind_nss_aix.c index 3e00e54e5c..a1bffccc66 100644 --- a/source3/nsswitch/winbind_nss_aix.c +++ b/source3/nsswitch/winbind_nss_aix.c @@ -741,6 +741,7 @@ static void wb_aix_close(void *token) return; } +#ifdef HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST /* return a list of additional attributes supported by the backend */ @@ -764,6 +765,7 @@ static attrlist_t **wb_aix_attrlist(void) return ret; } +#endif /* @@ -977,7 +979,9 @@ int wb_aix_init(struct secmethod_table *methods) { 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 @@ int wb_aix_init(struct secmethod_table *methods) 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; -- cgit