Print this page
Revert exi_zone to exi_zoneid, and install exi_ne backpointer

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/nfs/nfs3_srv.c
          +++ new/usr/src/uts/common/fs/nfs/nfs3_srv.c
↓ open down ↓ 437 lines elided ↑ open up ↑
 438  438                  resp->status = NFS3ERR_NAMETOOLONG;
 439  439                  goto out1;
 440  440          }
 441  441  
 442  442          if (args->what.name == NULL || *(args->what.name) == '\0') {
 443  443                  resp->status = NFS3ERR_ACCES;
 444  444                  goto out1;
 445  445          }
 446  446  
 447  447          fhp = &args->what.dir;
 448      -        ASSERT3P(curzone, ==, exi->exi_zone); /* exi is guaranteed non-NULL. */
      448 +        ASSERT3U(curzone->zone_id, ==, exi->exi_zoneid); /* exi is non-NULL */
 449  449          if (strcmp(args->what.name, "..") == 0 &&
 450  450              EQFID(&exi->exi_fid, FH3TOFIDP(fhp))) {
 451  451                  if ((exi->exi_export.ex_flags & EX_NOHIDE) &&
 452  452                      ((dvp->v_flag & VROOT) || VN_IS_CURZONEROOT(dvp))) {
 453  453                          /*
 454  454                           * special case for ".." and 'nohide'exported root
 455  455                           */
 456  456                          if (rfs_climb_crossmnt(&dvp, &exi, cr) != 0) {
 457  457                                  resp->status = NFS3ERR_ACCES;
 458  458                                  goto out1;
↓ open down ↓ 870 lines elided ↑ open up ↑
1329 1329  
1330 1330          DTRACE_NFSV3_5(op__write__start, struct svc_req *, req,
1331 1331              cred_t *, cr, vnode_t *, vp, struct exportinfo *, exi,
1332 1332              WRITE3args *, args);
1333 1333  
1334 1334          if (vp == NULL) {
1335 1335                  error = ESTALE;
1336 1336                  goto err;
1337 1337          }
1338 1338  
1339      -        ASSERT3P(curzone, ==, exi->exi_zone); /* exi is guaranteed non-NULL. */
     1339 +        ASSERT3U(curzone->zone_id, ==, exi->exi_zoneid); /* exi is non-NULL. */
1340 1340          ns = nfs3_get_srv();
1341 1341  
1342 1342          if (is_system_labeled()) {
1343 1343                  bslabel_t *clabel = req->rq_label;
1344 1344  
1345 1345                  ASSERT(clabel != NULL);
1346 1346                  DTRACE_PROBE2(tx__rfs3__log__info__opwrite__clabel, char *,
1347 1347                      "got client label from request(1)", struct svc_req *, req);
1348 1348  
1349 1349                  if (!blequal(&l_admin_low->tsl_label, clabel)) {
↓ open down ↓ 2782 lines elided ↑ open up ↑
4132 4132  
4133 4133          DTRACE_NFSV3_5(op__commit__start, struct svc_req *, req,
4134 4134              cred_t *, cr, vnode_t *, vp, struct exportinfo *, exi,
4135 4135              COMMIT3args *, args);
4136 4136  
4137 4137          if (vp == NULL) {
4138 4138                  error = ESTALE;
4139 4139                  goto out;
4140 4140          }
4141 4141  
4142      -        ASSERT3P(curzone, ==, exi->exi_zone); /* exi is guaranteed non-NULL. */
     4142 +        ASSERT3U(curzone->zone_id, ==, exi->exi_zoneid); /* exi is non-NULL. */
4143 4143          ns = nfs3_get_srv();
4144 4144          bva.va_mask = AT_ALL;
4145 4145          error = VOP_GETATTR(vp, &bva, 0, cr, NULL);
4146 4146  
4147 4147          /*
4148 4148           * If we can't get the attributes, then we can't do the
4149 4149           * right access checking.  So, we'll fail the request.
4150 4150           */
4151 4151          if (error)
4152 4152                  goto out;
↓ open down ↓ 313 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX