Print this page
Try to remove assumption that zone's root vnode is marked VROOT
*** 409,419 ****
rfs_climb_crossmnt(vnode_t **dvpp, struct exportinfo **exip, cred_t *cr)
{
struct exportinfo *exi;
vnode_t *dvp = *dvpp;
! ASSERT(dvp->v_flag & VROOT);
VN_HOLD(dvp);
dvp = untraverse(dvp);
exi = nfs_vptoexi(NULL, dvp, cr, NULL, NULL, FALSE);
if (exi == NULL) {
--- 409,419 ----
rfs_climb_crossmnt(vnode_t **dvpp, struct exportinfo **exip, cred_t *cr)
{
struct exportinfo *exi;
vnode_t *dvp = *dvpp;
! ASSERT((dvp->v_flag & VROOT) || VN_IS_CURZONEROOT(dvp));
VN_HOLD(dvp);
dvp = untraverse(dvp);
exi = nfs_vptoexi(NULL, dvp, cr, NULL, NULL, FALSE);
if (exi == NULL) {
*** 488,498 ****
* then the ".." refers beyond the root of an exported filesystem.
*/
if (strcmp(da->da_name, "..") == 0 &&
EQFID(&exi->exi_fid, (fid_t *)&fhp->fh_len)) {
if ((exi->exi_export.ex_flags & EX_NOHIDE) &&
! (dvp->v_flag & VROOT)) {
/*
* special case for ".." and 'nohide'exported root
*/
if (rfs_climb_crossmnt(&dvp, &exi, cr) != 0) {
error = NFSERR_ACCES;
--- 488,498 ----
* then the ".." refers beyond the root of an exported filesystem.
*/
if (strcmp(da->da_name, "..") == 0 &&
EQFID(&exi->exi_fid, (fid_t *)&fhp->fh_len)) {
if ((exi->exi_export.ex_flags & EX_NOHIDE) &&
! ((dvp->v_flag & VROOT) || VN_IS_CURZONEROOT(dvp))) {
/*
* special case for ".." and 'nohide'exported root
*/
if (rfs_climb_crossmnt(&dvp, &exi, cr) != 0) {
error = NFSERR_ACCES;