Print this page
Try to remove assumption that zone's root vnode is marked VROOT

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/nfs/nfs_export.c
          +++ new/usr/src/uts/common/fs/nfs/nfs_export.c
↓ open down ↓ 722 lines elided ↑ open up ↑
 723  723                  return;
 724  724  
 725  725          /*
 726  726           * If flavors are being added and the new export root isn't
 727  727           * also VROOT, its implicitly allowed flavors are inherited from
 728  728           * its pseudonode.
 729  729           * Note - for VROOT exports the implicitly allowed flavors were
 730  730           * transferred from the PSEUDO export in exportfs()
 731  731           */
 732  732          if (isadd && !(exip->exi_vp->v_flag & VROOT) &&
      733 +            !VN_IS_CURZONEROOT(exip->exi_vp) &&
 733  734              tnode->tree_vis->vis_seccnt > 0) {
 734  735                  srv_secinfo_add(&exip->exi_export.ex_secinfo,
 735  736                      &exip->exi_export.ex_seccnt, tnode->tree_vis->vis_secinfo,
 736  737                      tnode->tree_vis->vis_seccnt, FALSE);
 737  738          }
 738  739  
 739  740          /*
 740  741           * Move to parent node and propagate sec flavor
 741  742           * to exportinfo and to visible structures.
 742  743           */
↓ open down ↓ 1326 lines elided ↑ open up ↑
2069 2070                           * Found the export info
2070 2071                           */
2071 2072                          break;
2072 2073                  }
2073 2074  
2074 2075                  /*
2075 2076                   * We have just failed finding a matching export.
2076 2077                   * If we're at the root of this filesystem, then
2077 2078                   * it's time to stop (with failure).
2078 2079                   */
2079      -                if (vp->v_flag & VROOT) {
     2080 +                if ((vp->v_flag & VROOT) || VN_IS_CURZONEROOT(vp)) {
2080 2081                          error = EINVAL;
2081 2082                          break;
2082 2083                  }
2083 2084  
2084 2085                  if (walk != NULL)
2085 2086                          (*walk)++;
2086 2087  
2087 2088                  /*
2088 2089                   * Now, do a ".." up vp. If dvp is supplied, use it,
2089 2090                   * otherwise, look it up.
↓ open down ↓ 784 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX