From: Andrew Deason Date: Fri, 15 Apr 2011 16:18:37 +0000 (-0500) Subject: AIX51: Fix PAGs X-Git-Tag: upstream/1.6.0.pre5^2~26 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d0edfe441bac4b802b2957bfb331ad04417a2acb;p=packages%2Fo%2Fopenafs.git AIX51: Fix PAGs 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: Ifbc2602cfa9f32bf5d9b53b71fc67fe0761394ea Reviewed-on: http://gerrit.openafs.org/4479 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/4503 --- diff --git a/src/afs/afs_osi_pag.c b/src/afs/afs_osi_pag.c index af9356fe3..68a2a4c7f 100644 --- a/src/afs/afs_osi_pag.c +++ b/src/afs/afs_osi_pag.c @@ -629,6 +629,9 @@ PagInCred(afs_ucred_t *cred) # 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