mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 17:00:15 +00:00
ukernel: make web enhancements the default
none of the web enhancements break base functionality, and they are strictly more functionality; just turn them on everywhere Change-Id: I462d3571d055f1d8ec19bdd0132b935bacd435c0 Reviewed-on: http://gerrit.openafs.org/5509 Tested-by: Derrick Brashear <shadow@dementix.org> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
5b579b83ab
commit
80943970b8
@ -1741,16 +1741,12 @@ uafs_LookupName(char *path, struct usr_vnode *parentVp,
|
||||
*/
|
||||
nextVc = NULL;
|
||||
nextVp = NULL;
|
||||
#ifdef AFS_WEB_ENHANCEMENTS
|
||||
if ((nextPathP != NULL && *nextPathP != '\0') || !no_eval_mtpt)
|
||||
code = afs_lookup(VTOAFS(vp), pathP, &nextVc, get_user_struct()->u_cred, 0);
|
||||
else
|
||||
code =
|
||||
afs_lookup(VTOAFS(vp), pathP, &nextVc, get_user_struct()->u_cred,
|
||||
AFS_LOOKUP_NOEVAL);
|
||||
#else
|
||||
code = afs_lookup(VTOAFS(vp), pathP, &nextVc, get_user_struct()->u_cred, 0);
|
||||
#endif /* AFS_WEB_ENHANCEMENTS */
|
||||
if (nextVc)
|
||||
nextVp=AFSTOV(nextVc);
|
||||
if (code != 0) {
|
||||
@ -3611,7 +3607,6 @@ uafs_afsPathName(char *path)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef AFS_WEB_ENHANCEMENTS
|
||||
/*
|
||||
* uafs_klog_nopag
|
||||
* klog but don't allocate a new pag
|
||||
@ -3787,6 +3782,4 @@ uafs_getRights(char *path)
|
||||
AFS_GUNLOCK();
|
||||
return afs_rights;
|
||||
}
|
||||
#endif /* AFS_WEB_ENHANCEMENTS */
|
||||
|
||||
#endif /* UKERNEL */
|
||||
|
@ -331,7 +331,7 @@ afs_access(OSI_VC_DECL(avc), afs_int32 amode,
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS)
|
||||
#if defined(UKERNEL)
|
||||
/*
|
||||
* afs_getRights
|
||||
* This function is just an interface to afs_GetAccessBits
|
||||
@ -355,4 +355,4 @@ afs_getRights(OSI_VC_DECL(avc), afs_int32 arights,
|
||||
|
||||
return afs_GetAccessBits(avc, arights, &treq);
|
||||
}
|
||||
#endif /* defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS) */
|
||||
#endif /* defined(UKERNEL) */
|
||||
|
@ -1783,10 +1783,10 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr
|
||||
if (tvc->mvstat == 1 && (tvc->f.states & CMValid) && tvc->mvid != NULL)
|
||||
force_eval = 1; /* This is now almost for free, get it correct */
|
||||
|
||||
#if defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS)
|
||||
#if defined(UKERNEL)
|
||||
if (!(flags & AFS_LOOKUP_NOEVAL))
|
||||
/* don't eval mount points */
|
||||
#endif /* UKERNEL && AFS_WEB_ENHANCEMENTS */
|
||||
#endif /* UKERNEL */
|
||||
if (tvc->mvstat == 1 && force_eval) {
|
||||
/* a mt point, possibly unevaluated */
|
||||
struct volume *tvolp;
|
||||
@ -1894,13 +1894,13 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr
|
||||
if (afs_mariner)
|
||||
afs_AddMarinerName(aname, tvc);
|
||||
|
||||
#if defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS)
|
||||
#if defined(UKERNEL)
|
||||
if (!(flags & AFS_LOOKUP_NOEVAL)) {
|
||||
/* Here we don't enter the name into the DNLC because we want the
|
||||
* evaluated mount dir to be there (the vcache for the mounted
|
||||
* volume) rather than the vc of the mount point itself. We can
|
||||
* still find the mount point's vc in the vcache by its fid. */
|
||||
#endif /* UKERNEL && AFS_WEB_ENHANCEMENTS */
|
||||
#endif /* UKERNEL */
|
||||
if (!hit && force_eval) {
|
||||
osi_dnlc_enter(adp, aname, tvc, &versionNo);
|
||||
} else {
|
||||
@ -1913,7 +1913,7 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr
|
||||
return 0; /* can't have been any errors if hit and !code */
|
||||
#endif
|
||||
}
|
||||
#if defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS)
|
||||
#if defined(UKERNEL)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -36,11 +36,11 @@ extern int afs_shuttingdown;
|
||||
|
||||
/* Exported variables */
|
||||
afs_uint32 pag_epoch;
|
||||
#if defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS)
|
||||
#if defined(UKERNEL)
|
||||
afs_uint32 pagCounter = 1;
|
||||
#else
|
||||
afs_uint32 pagCounter = 0;
|
||||
#endif /* UKERNEL && AFS_WEB_ENHANCEMENTS */
|
||||
#endif /* UKERNEL */
|
||||
|
||||
#ifdef AFS_LINUX26_ONEGROUP_ENV
|
||||
#define NUMPAGGROUPS 1
|
||||
@ -73,7 +73,7 @@ afs_uint32 pagCounter = 0;
|
||||
* anyway, so the pag is an alternative handle which is somewhat more
|
||||
* secure (although of course not absolutely secure).
|
||||
*/
|
||||
#if !defined(UKERNEL) || !defined(AFS_WEB_ENHANCEMENTS)
|
||||
#if !defined(UKERNEL)
|
||||
afs_uint32
|
||||
genpag(void)
|
||||
{
|
||||
@ -125,7 +125,7 @@ getpag(void)
|
||||
return (pagCounter);
|
||||
#endif
|
||||
}
|
||||
#endif /* UKERNEL && AFS_WEB_ENHANCEMENTS */
|
||||
#endif /* UKERNEL */
|
||||
|
||||
/* used to require 10 seconds between each setpag to guarantee that
|
||||
* PAGs never wrap - which would be a security hole. If we presume
|
||||
@ -292,7 +292,7 @@ afs_setpag(void)
|
||||
return (code);
|
||||
}
|
||||
|
||||
#if defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS)
|
||||
#if defined(UKERNEL)
|
||||
/*
|
||||
* afs_setpag_val
|
||||
* This function is like setpag but sets the current thread's pag id to a
|
||||
@ -415,7 +415,7 @@ afs_getpag_val(void)
|
||||
return pagvalue;
|
||||
}
|
||||
#endif
|
||||
#endif /* UKERNEL && AFS_WEB_ENHANCEMENTS */
|
||||
#endif /* UKERNEL */
|
||||
|
||||
|
||||
/* Note - needs to be available on AIX, others can be static - rework this */
|
||||
@ -503,13 +503,13 @@ afs_get_pag_from_groups(gid_t g0a, gid_t g1a)
|
||||
h = (g0 >> 14);
|
||||
h = (g1 >> 14) + h + h + h;
|
||||
ret = ((h << 28) | l);
|
||||
# if defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS)
|
||||
# if defined(UKERNEL)
|
||||
return ret;
|
||||
# else
|
||||
/* Additional testing */
|
||||
if (((ret >> 24) & 0xff) == 'A')
|
||||
return ret;
|
||||
# endif /* UKERNEL && AFS_WEB_ENHANCEMENTS */
|
||||
# endif /* UKERNEL */
|
||||
}
|
||||
return NOPAG;
|
||||
}
|
||||
@ -522,9 +522,9 @@ afs_get_groups_from_pag(afs_uint32 pag, gid_t * g0p, gid_t * g1p)
|
||||
AFS_STATCNT(afs_get_groups_from_pag);
|
||||
*g0p = pag;
|
||||
*g1p = 0;
|
||||
# if !defined(UKERNEL) || !defined(AFS_WEB_ENHANCEMENTS)
|
||||
# if !defined(UKERNEL)
|
||||
pag &= 0x7fffffff;
|
||||
# endif /* UKERNEL && AFS_WEB_ENHANCEMENTS */
|
||||
# endif /* UKERNEL */
|
||||
g0 = 0x3fff & (pag >> 14);
|
||||
g1 = 0x3fff & pag;
|
||||
g0 |= ((pag >> 28) / 3) << 14;
|
||||
|
@ -2141,7 +2141,7 @@ UAFS.pic/libuafs_pic.a: setup_picuafs
|
||||
|
||||
JUAFS/$(LIBJUAFS): setup_juafs
|
||||
cd JUAFS && \
|
||||
$(MAKE) $(LIBJUAFS) DESTDIR=${DESTDIR} LIBJUAFS_FLAGS=-DAFS_WEB_ENHANCEMENTS && \
|
||||
$(MAKE) $(LIBJUAFS) DESTDIR=${DESTDIR} LIBJUAFS_FLAGS=&& \
|
||||
$(RANLIB) $(LIBJUAFS)
|
||||
|
||||
AFSWEB/$(LIBAFSWEB): setup_nsafs
|
||||
|
Loading…
Reference in New Issue
Block a user