void adjust_res (svccb *sbp, void *res, ptr<acltargetlist> targets) { assert (targets); #if ACL_SETFS u_int sfsperms = SFSACCESS_ALL ; #else u_int sfsperms = targets->get_p1 (); #endif u_int requested; //either 0 or whatever perms were requested if (sbp->proc () == NFSPROC3_ACCESS) requested = sbp->Xtmpl getarg<access3args> ()-> access; else requested = 0; adjust_access3res acc (sfsperms, requested); if (sbp->proc () == NFSPROC3_ACCESS) nfs3_traverse_res (acc, sbp->proc (), res); nfs3_exp_enable (sbp->proc (), res); //ok to do multiple times? adjust_res_size (sbp, res); // -= ACLSIZE for files only adjust_res_mode (sbp, res, acc); }
void nfs3_getattrinfo (attrvec *avp, u_int32_t proc, void *argp, void *resp) { if (proc == NFSPROC3_NULL) return; avp->clear (); avp->push_back ().fh = static_cast<nfs_fh3 *> (argp); nfs3_traverse_res (*avp, proc, resp); if (!(*avp)[0].fattr && (nfs_constop (proc) || static_cast<nfsstat3 *> (resp))) avp->pop_front (); }