#include "osi_compat.h"
#ifdef AFS_LINUX26_ONEGROUP_ENV
-# define NUMPAGGROUPS 1
static afs_uint32
afs_linux_pag_from_groups(struct group_info *group_info) {
afs_uint32 g0 = 0;
afs_uint32 i;
- if (group_info->ngroups < NUMPAGGROUPS)
+ if (group_info->ngroups < AFS_NUMPAGGROUPS)
return NOPAG;
for (i = 0; i < group_info->ngroups; i++) {
afs_kgid_t newkgid = afs_make_kgid(newpag);
if (afs_linux_pag_from_groups(old) == NOPAG)
- need_space = NUMPAGGROUPS;
+ need_space = AFS_NUMPAGGROUPS;
*new = groups_alloc(old->ngroups + need_space);
}
#else
-# define NUMPAGGROUPS 2
static inline afs_uint32
afs_linux_pag_from_groups(struct group_info *group_info) {
- if (group_info->ngroups < NUMPAGGROUPS)
+ if (group_info->ngroups < AFS_NUMPAGGROUPS)
return NOPAG;
return afs_get_pag_from_groups(GROUP_AT(group_info, 0), GROUP_AT(group_info, 1));
gid_t g1;
if (afs_linux_pag_from_groups(old) == NOPAG)
- need_space = NUMPAGGGROUPS;
+ need_space = AFS_NUMPAGGROUPS;
*new = groups_alloc(old->ngroups + need_space);
#define osi_curcred() (u.u_cred)
#endif
+#ifdef AFS_LINUX26_ONEGROUP_ENV
+#define AFS_NUMPAGGROUPS 1
+#else
+#define AFS_NUMPAGGROUPS 2
+#endif
+
#endif /* _AFS_OSI_ */
afs_uint32 pagCounter = 0;
#endif /* UKERNEL */
-#ifdef AFS_LINUX26_ONEGROUP_ENV
-#define NUMPAGGROUPS 1
-#else
-#define NUMPAGGROUPS 2
-#endif
-/* Local variables */
-
/*
* Pags are implemented as follows: the set of groups whose long
* representation is '41XXXXXX' hex are used to represent the pags.
if (cred->cr_ngrps < 2)
return NOPAG;
# elif defined(AFS_LINUX26_ENV)
- if (afs_cr_group_info(cred)->ngroups < NUMPAGGROUPS)
+ if (afs_cr_group_info(cred)->ngroups < AFS_NUMPAGGROUPS)
return NOPAG;
# elif defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_XBSD_ENV)
# if defined(AFS_SUN510_ENV)