On AIX 5.1 and later, we set a process' PAG by using the AIX PAG
mechanism (and not by group ids), but we were determining what PAG a
process was in by the group list. Instead use the PAG identifier.
This effectively reverts
277c37f48c8126ba9cb986ffc7361fcb98e2bbf2, but
it puts the kcred_getpag call in a different place that makes more
sense in the current PAG code organization.
Change-Id: If9fe621060a06664718a00acff91dea66760d5c2
Reviewed-on: http://gerrit.openafs.org/4479
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
# endif
if (pag == NOPAG)
pag = osi_get_keyring_pag(cred);
+#elif defined(AFS_AIX51_ENV)
+ if (kcred_getpag(cred, PAG_AFS, &pag) < 0 || pag == 0)
+ pag = NOPAG;
#else
pag = osi_get_group_pag(cred);
#endif