1628 anon_ok = 0;
1629
1630 cr = xprt->xp_cred;
1631 ASSERT(cr != NULL);
1632 #ifdef DEBUG
1633 if (crgetref(cr) != 1) {
1634 crfree(cr);
1635 cr = crget();
1636 xprt->xp_cred = cr;
1637 cred_misses++;
1638 } else
1639 cred_hits++;
1640 #else
1641 if (crgetref(cr) != 1) {
1642 crfree(cr);
1643 cr = crget();
1644 xprt->xp_cred = cr;
1645 }
1646 #endif
1647
1648 exi = checkexport(fsid, xfid);
1649
1650 if (exi != NULL) {
1651 publicfh_ok = PUBLICFH_CHECK(disp, exi, fsid, xfid);
1652
1653 /*
1654 * Don't allow non-V4 clients access
1655 * to pseudo exports
1656 */
1657 if (PSEUDO(exi)) {
1658 svcerr_weakauth(xprt);
1659 error++;
1660 goto done;
1661 }
1662
1663 authres = checkauth(exi, req, cr, anon_ok, publicfh_ok,
1664 &ro);
1665 /*
1666 * authres > 0: authentication OK - proceed
1667 * authres == 0: authentication weak - return error
1668 * authres < 0: authentication timeout - drop
|
1628 anon_ok = 0;
1629
1630 cr = xprt->xp_cred;
1631 ASSERT(cr != NULL);
1632 #ifdef DEBUG
1633 if (crgetref(cr) != 1) {
1634 crfree(cr);
1635 cr = crget();
1636 xprt->xp_cred = cr;
1637 cred_misses++;
1638 } else
1639 cred_hits++;
1640 #else
1641 if (crgetref(cr) != 1) {
1642 crfree(cr);
1643 cr = crget();
1644 xprt->xp_cred = cr;
1645 }
1646 #endif
1647
1648 exi = checkexport(fsid, xfid, NULL);
1649
1650 if (exi != NULL) {
1651 publicfh_ok = PUBLICFH_CHECK(disp, exi, fsid, xfid);
1652
1653 /*
1654 * Don't allow non-V4 clients access
1655 * to pseudo exports
1656 */
1657 if (PSEUDO(exi)) {
1658 svcerr_weakauth(xprt);
1659 error++;
1660 goto done;
1661 }
1662
1663 authres = checkauth(exi, req, cr, anon_ok, publicfh_ok,
1664 &ro);
1665 /*
1666 * authres > 0: authentication OK - proceed
1667 * authres == 0: authentication weak - return error
1668 * authres < 0: authentication timeout - drop
|