summaryrefslogtreecommitdiff
path: root/source/nsswitch/winbind_nss_aix.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/nsswitch/winbind_nss_aix.c')
-rw-r--r--source/nsswitch/winbind_nss_aix.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/nsswitch/winbind_nss_aix.c b/source/nsswitch/winbind_nss_aix.c
index 3e00e54e5c4..c90dc2f3f10 100644
--- a/source/nsswitch/winbind_nss_aix.c
+++ b/source/nsswitch/winbind_nss_aix.c
@@ -159,12 +159,13 @@ static unsigned decode_id(const char *name)
return id;
}
+static struct passwd *wb_aix_getpwuid(uid_t uid);
+
static char *decode_user(const char *name)
{
struct passwd *pwd;
unsigned id;
char *ret;
- static struct passwd *wb_aix_getpwuid(uid_t uid);
sscanf(name+1, "%u", &id);
pwd = wb_aix_getpwuid(id);
@@ -741,6 +742,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 +766,7 @@ static attrlist_t **wb_aix_attrlist(void)
return ret;
}
+#endif
/*
@@ -977,7 +980,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 +1002,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;