linux26-cred-cleanup-20040621

FIXES 5362

change how cred is stored on linux 2.6
This commit is contained in:
Chas Williams 2004-06-21 21:01:50 +00:00 committed by Derrick Brashear
parent 7b06d5a9f5
commit e1092aa9b5

View File

@ -74,13 +74,14 @@ osi_Init(void)
#endif /* AFS_HPUX_ENV */
if (!afs_osicred_initialized) {
#if defined(AFS_LINUX26_ENV)
afs_osi_credp = crref();
#elif defined(AFS_XBSD_ENV)
#if defined(AFS_XBSD_ENV)
/* Can't just invent one, must use crget() because of mutex */
afs_osi_credp = crdup(osi_curcred());
#else
memset(&afs_osi_cred, 0, sizeof(struct AFS_UCRED));
#if defined(AFS_LINUX26_ENV)
afs_osi_cred.cr_group_info = groups_alloc(0);
#endif
crhold(&afs_osi_cred); /* don't let it evaporate */
afs_osi_credp = &afs_osi_cred;
#endif