Print this page
NEX-6673 possible NULL pointer dereference in mountd`mount
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Alex Deiter <alex.deiter@nexenta.com>
NEX-4116 mountd: The IP to name translation is usually not needed in nfsauth_access()
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
NEX-1974 Support for more than 16 groups with AUTH_SYS
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
NEX-1128 NFS server: Generic uid and gid remapping for AUTH_SYS
Reviewed by: Jan Kryl <jan.kryl@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fs.d/nfs/mountd/nfsauth.c
          +++ new/usr/src/cmd/fs.d/nfs/mountd/nfsauth.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23      - * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  24      - */
  25      -
  26      -/*
  27   23   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  28   24   * Use is subject to license terms.
       25 + * Copyright 2016 Nexenta Systems, Inc.
  29   26   */
  30   27  
  31   28  #include <stdio.h>
  32   29  #include <stdlib.h>
  33   30  #include <sys/types.h>
  34   31  #include <string.h>
  35   32  #include <sys/param.h>
  36   33  #include <sys/stat.h>
  37   34  #include <sys/file.h>
  38   35  #include <sys/time.h>
↓ open down ↓ 44 lines elided ↑ open up ↑
  83   80  
  84   81          result->auth_perm = check_client(sh, &cln, argp->req_flavor,
  85   82              argp->req_clnt_uid, argp->req_clnt_gid, argp->req_clnt_gids.len,
  86   83              argp->req_clnt_gids.val, &result->auth_srv_uid,
  87   84              &result->auth_srv_gid, &result->auth_srv_gids.len,
  88   85              &result->auth_srv_gids.val);
  89   86  
  90   87          sharefree(sh);
  91   88  
  92   89          if (result->auth_perm == NFSAUTH_DENIED) {
  93      -                char *host = cln_gethost(&cln);
  94      -                if (host != NULL)
  95      -                        syslog(LOG_ERR, "%s denied access to %s", host,
  96      -                            argp->req_path);
       90 +                syslog(LOG_ERR, "%s denied access to %s", cln_gethost(&cln),
       91 +                    argp->req_path);
  97   92          }
  98   93  
  99   94          cln_fini(&cln);
 100   95  }
 101   96  
 102   97  void
 103      -nfsauth_func(void *cookie, char *dataptr, size_t arg_size,
 104      -        door_desc_t *dp, uint_t n_desc)
 105      -
       98 +nfsauth_func(void *cookie, char *dataptr, size_t arg_size, door_desc_t *dp,
       99 +    uint_t n_desc)
 106  100  {
 107  101          nfsauth_arg_t   *ap;
 108  102          nfsauth_res_t    res = {0};
 109  103          XDR              xdrs_a;
 110  104          XDR              xdrs_r;
 111  105          size_t           rbsz;
 112  106          caddr_t          rbuf;
 113  107          varg_t           varg = {0};
 114  108  
 115  109          /*
↓ open down ↓ 79 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX