short afs_waitForeverCount = 0;
afs_int32 afs_showflags = GAGUSER | GAGCONSOLE; /* show all messages */
-#ifdef AFS_DISCON_ENV
afs_int32 afs_is_disconnected;
afs_int32 afs_is_discon_rw;
/* On reconnection, turn this knob on until it finishes,
* then turn it off.
*/
afs_int32 afs_in_sync = 0;
-#endif
struct afs_pdata {
char *ptr;
DECL_PIOCTL(PGetPAG);
#if defined(AFS_CACHE_BYPASS)
DECL_PIOCTL(PSetCachingThreshold);
-DECL_PIOCTL(PSetCachingBlkSize);
#endif
/*
goto loop;
}
#ifdef AFS_DARWIN80_ENV
- if (tvc->f.states & CDeadVnode) {
- if (!(tvc->f.states & CBulkFetching)) {
- ReleaseReadLock(&afs_xvcache);
- afs_osi_Sleep(&tvc->f.states);
- goto loop;
+ if (tvc->f.states & CDeadVnode) {
+ if (!(tvc->f.states & CBulkFetching)) {
+ ReleaseReadLock(&afs_xvcache);
+ afs_osi_Sleep(&tvc->f.states);
+ goto loop;
+ }
}
- }
-#endif
-#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV)
- AFS_FAST_HOLD(tvc);
-#elif defined(AFS_DARWIN80_ENV)
vp = AFSTOV(tvc);
if (vnode_get(vp))
continue;
newcred->cr_groupset.gs_union.un_groups[1] = g1;
#elif defined(AFS_LINUX26_ENV)
# ifdef AFS_LINUX26_ONEGROUP_ENV
- set_cr_group_info(newcred, groups_alloc(1)); /* nothing sets this */
+ afs_set_cr_group_info(newcred, groups_alloc(1)); /* nothing sets this */
l = (((g0-0x3f00) & 0x3fff) << 14) | ((g1-0x3f00) & 0x3fff);
h = ((g0-0x3f00) >> 14);
h = ((g1-0x3f00) >> 14) + h + h + h;
- GROUP_AT(cr_group_info(newcred), 0) = ((h << 28) | l);
+ GROUP_AT(afs_cr_group_info(newcred), 0) = ((h << 28) | l);
# else
- set_cr_group_info(newcred, groups_alloc(2));
- GROUP_AT(cr_group_info(newcred), 0) = g0;
- GROUP_AT(cr_group_info(newcred), 1) = g1;
+ afs_set_cr_group_info(newcred, groups_alloc(2));
+ GROUP_AT(afs_cr_group_info(newcred), 0) = g0;
+ GROUP_AT(afs_cr_group_info(newcred), 1) = g1;
# endif
#elif defined(AFS_SUN510_ENV)
gids[0] = g0;
{
afs_int32 getting = 1;
afs_int32 setting = 1;
- afs_int32 threshold;
+ afs_int32 threshold = AFS_CACHE_BYPASS_DISABLED;
if (afs_pd_getInt(ain, &threshold) != 0)
setting = 0;
DECL_PIOCTL(PDiscon)
{
-#ifdef AFS_DISCON_ENV
static afs_int32 mode = 1; /* Start up in 'off' */
afs_int32 force = 0;
int code = 0;
- char flags[3];
+ char flags[4];
+ struct vrequest lreq;
- if (afs_pd_getBytes(ain, &flags, 3) == 0) {
+ if (afs_pd_getBytes(ain, &flags, 4) == 0) {
if (!afs_osi_suser(*acred))
return EPERM;
afs_ConflictPolicy = flags[1] - 1;
if (flags[2])
force = 1;
+ if (flags[3]) {
+ /* Fake InitReq support for UID override */
+ memset(&lreq, 0, sizeof(lreq));
+ lreq.uid = flags[3];
+ areq = &lreq; /* override areq we got */
+ }
/*
* All of these numbers are hard coded in fs.c. If they
return code;
return afs_pd_putInt(aout, mode);
-#else
- return EINVAL;
-#endif
}
DECL_PIOCTL(PNFSNukeCreds)