From 0f26b1386a8beaa1884178f8793c91d84274ea7d Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 28 Feb 2008 23:16:04 +1100 Subject: - (dtucker) [configure.ac openbsd-compat/port-aix.{c,h}] Bug #1081: Implement getgrouplist via getgrset on AIX, rather than iterating over getgrent. This allows, eg, Match and AllowGroups directives to work with NIS and LDAP groups. --- openbsd-compat/port-aix.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'openbsd-compat/port-aix.h') diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h index 5a04bedad..14024d417 100644 --- a/openbsd-compat/port-aix.h +++ b/openbsd-compat/port-aix.h @@ -1,9 +1,9 @@ -/* $Id: port-aix.h,v 1.27 2006/09/18 13:54:33 dtucker Exp $ */ +/* $Id: port-aix.h,v 1.28 2008/02/28 12:16:04 dtucker Exp $ */ /* * * Copyright (c) 2001 Gert Doering. All rights reserved. - * Copyright (c) 2004, 2005 Darren Tucker. All rights reserved. + * Copyright (c) 2004,2005,2006 Darren Tucker. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -103,4 +103,16 @@ int sshaix_getnameinfo(const struct sockaddr *, size_t, char *, size_t, # define getnameinfo(a,b,c,d,e,f,g) (sshaix_getnameinfo(a,b,c,d,e,f,g)) #endif +/* + * We use getgrset in preference to multiple getgrent calls for efficiency + * plus it supports NIS and LDAP groups. + */ +#if !defined(HAVE_GETGROUPLIST) && defined(HAVE_GETGRSET) +# define HAVE_GETGROUPLIST +# define USE_GETGRSET +int getgrouplist(const char *, gid_t, gid_t *, int *); +int ssh_initgroups(const char *, gid_t); +# define initgroups(a, b) ssh_initgroups((a), (b)) +#endif + #endif /* _AIX */ -- cgit v1.2.3