Print this page
NEX-14051 Be careful with RPC groups
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
8085 Handle RPC groups better
Reviewed by: "Joshua M. Clulow" <josh@sysmgr.org>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Dan McDonald <danmcd@omniti.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fs.d/nfs/rquotad/rpc.rquotad.c
          +++ new/usr/src/cmd/fs.d/nfs/rquotad/rpc.rquotad.c
↓ open down ↓ 312 lines elided ↑ open up ↑
 313  313          register struct svc_req *rqstp;
 314  314          register SVCXPRT *transp;
 315  315  {
 316  316          struct getquota_args gqa;
 317  317          struct getquota_rslt gqr;
 318  318          struct dqblk dqblk;
 319  319          struct fsquot *fsqp;
 320  320          struct timeval tv;
 321  321          bool_t qactive;
 322  322  
      323 +        CTASSERT(sizeof (authp) <= RQCRED_SIZE);
      324 +
 323  325          gqa.gqa_pathp = NULL;           /* let xdr allocate the storage */
 324  326          if (!svc_getargs(transp, xdr_getquota_args, (caddr_t)&gqa)) {
 325  327                  svcerr_decode(transp);
 326  328                  return;
 327  329          }
 328  330          /*
 329  331           * This authentication is really bogus with the current rpc
 330  332           * authentication scheme. One day we will have something for real.
 331  333           */
 332  334          CTASSERT(sizeof (authp) <= RQCRED_SIZE);
↓ open down ↓ 403 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX