Print this page
curzone reality check and teardown changes to use the RIGHT zone


 857         nfsauth_globals_t       *nag;
 858         struct netbuf           *taddrmask;
 859         struct netbuf           addr;   /* temporary copy of client's address */
 860         const struct netbuf     *claddr;
 861         avl_tree_t              *tree;
 862         struct auth_cache       ac;     /* used as a template for avl_find() */
 863         struct auth_cache_clnt  *c;
 864         struct auth_cache_clnt  acc;    /* used as a template for avl_find() */
 865         struct auth_cache       *p = NULL;
 866         int                     access;
 867 
 868         uid_t                   tmpuid;
 869         gid_t                   tmpgid;
 870         uint_t                  tmpngids;
 871         gid_t                   *tmpgids;
 872 
 873         avl_index_t             where;  /* used for avl_find()/avl_insert() */
 874 
 875         ASSERT(cr != NULL);
 876 

 877         nag = zone_getspecific(nfsauth_zone_key, curzone);
 878 
 879         /*
 880          * Now check whether this client already
 881          * has an entry for this flavor in the cache
 882          * for this export.
 883          * Get the caller's address, mask off the
 884          * parts of the address that do not identify
 885          * the host (port number, etc), and then hash
 886          * it to find the chain of cache entries.
 887          */
 888 
 889         claddr = svc_getrpccaller(req->rq_xprt);
 890         addr = *claddr;
 891         addr.buf = kmem_alloc(addr.maxlen, KM_SLEEP);
 892         bcopy(claddr->buf, addr.buf, claddr->len);
 893 
 894         SVC_GETADDRMASK(req->rq_xprt, SVC_TATTR_ADDRMASK, (void **)&taddrmask);
 895         ASSERT(taddrmask != NULL);
 896         addrmask(&addr, taddrmask);




 857         nfsauth_globals_t       *nag;
 858         struct netbuf           *taddrmask;
 859         struct netbuf           addr;   /* temporary copy of client's address */
 860         const struct netbuf     *claddr;
 861         avl_tree_t              *tree;
 862         struct auth_cache       ac;     /* used as a template for avl_find() */
 863         struct auth_cache_clnt  *c;
 864         struct auth_cache_clnt  acc;    /* used as a template for avl_find() */
 865         struct auth_cache       *p = NULL;
 866         int                     access;
 867 
 868         uid_t                   tmpuid;
 869         gid_t                   tmpgid;
 870         uint_t                  tmpngids;
 871         gid_t                   *tmpgids;
 872 
 873         avl_index_t             where;  /* used for avl_find()/avl_insert() */
 874 
 875         ASSERT(cr != NULL);
 876 
 877         ASSERT3P(curzone, ==, exi->exi_zone);
 878         nag = zone_getspecific(nfsauth_zone_key, curzone);
 879 
 880         /*
 881          * Now check whether this client already
 882          * has an entry for this flavor in the cache
 883          * for this export.
 884          * Get the caller's address, mask off the
 885          * parts of the address that do not identify
 886          * the host (port number, etc), and then hash
 887          * it to find the chain of cache entries.
 888          */
 889 
 890         claddr = svc_getrpccaller(req->rq_xprt);
 891         addr = *claddr;
 892         addr.buf = kmem_alloc(addr.maxlen, KM_SLEEP);
 893         bcopy(claddr->buf, addr.buf, claddr->len);
 894 
 895         SVC_GETADDRMASK(req->rq_xprt, SVC_TATTR_ADDRMASK, (void **)&taddrmask);
 896         ASSERT(taddrmask != NULL);
 897         addrmask(&addr, taddrmask);