Print this page
13026 SMB and NFS use the global zone's IDMAP when they shouldn't
Change-Id: I3b5f7bc68bb77764aa7cb59a48dd1740a8387ccf

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/cred.c
          +++ new/usr/src/uts/common/os/cred.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   * Copyright (c) 2013, Ira Cooper.  All rights reserved.
       23 + * Copyright 2020 Nexenta by DDN, Inc. All rights reserved.
  23   24   */
  24   25  /*
  25   26   * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  26   27   */
  27   28  
  28   29  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  29   30  /*        All Rights Reserved   */
  30   31  
  31   32  /*
  32   33   * University Copyright- Copyright (c) 1982, 1986, 1988
↓ open down ↓ 248 lines elided ↑ open up ↑
 281  282  
 282  283  /*
 283  284   * Allocate a initialized cred structure and crhold() it.
 284  285   * Initialized means: all ids 0, group count 0, L=Full, E=P=I=I0
 285  286   */
 286  287  cred_t *
 287  288  crget(void)
 288  289  {
 289  290          cred_t *cr = kmem_cache_alloc(cred_cache, KM_SLEEP);
 290  291  
 291      -        bcopy(kcred, cr, crsize);
      292 +        bcopy(zone_kcred(), cr, crsize);
 292  293          cr->cr_ref = 1;
 293  294          zone_cred_hold(cr->cr_zone);
 294  295          if (cr->cr_label)
 295  296                  label_hold(cr->cr_label);
 296  297          ASSERT(cr->cr_klpd == NULL);
 297  298          ASSERT(cr->cr_grps == NULL);
 298  299          return (cr);
 299  300  }
 300  301  
 301  302  /*
↓ open down ↓ 1179 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX