]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
AIX51: Fix PAGs
authorAndrew Deason <adeason@sinenomine.net>
Fri, 15 Apr 2011 16:18:37 +0000 (11:18 -0500)
committerDerrick Brashear <shadow@dementia.org>
Tue, 26 Apr 2011 04:47:57 +0000 (21:47 -0700)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-on: http://gerrit.openafs.org/4503

src/afs/afs_osi_pag.c

index af9356fe3b42adb5d52341998934dd11aef2c4cc..68a2a4c7fda942b0c0f32e6c660580a4a4a59308 100644 (file)
@@ -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