Print this page
NEX-19057 All zfs/nfs/smb threads in door calls to idle idmap
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
NEX-1638 Updated DC Locator
 Includes work by: matt.barden@nexenta.com, kevin.crowe@nexenta.com

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/idmap/idmapd/idmap_lsa.c
          +++ new/usr/src/cmd/idmap/idmapd/idmap_lsa.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  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   23   * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  24      - * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
       24 + * Copyright 2019 Nexenta Systems, Inc.  All rights reserved.
  25   25   */
  26   26  
  27   27  /*
  28   28   * LSA lookups
  29   29   */
  30   30  
  31   31  #include <stdio.h>
  32   32  #include <note.h>
  33   33  #include <assert.h>
  34   34  
↓ open down ↓ 41 lines elided ↑ open up ↑
  76   76          char sid[SMB_SID_STRSZ + 1];
  77   77          idmap_retcode ret;
  78   78          int rc;
  79   79  
  80   80          (void) memset(&acct, 0, sizeof (acct));
  81   81          *ret_name = NULL;
  82   82          *ret_domain = NULL;
  83   83  
  84   84          (void) snprintf(sid, sizeof (sid), "%s-%u", sidprefix, rid);
  85   85  
  86      -        rc = smb_lookup_sid(sid, &acct);
       86 +        rc = smb_lookup_lsid(sid, &acct);
  87   87          if (rc != 0) {
  88   88                  idmapdlog(LOG_ERR, "Error:  smb_lookup_sid failed.");
  89   89                  idmapdlog(LOG_ERR,
  90   90                      "Check SMB service (svc:/network/smb/server).");
  91   91                  idmapdlog(LOG_ERR,
  92   92                      "Check connectivity to Active Directory.");
  93   93  
  94   94                  ret = IDMAP_ERR_OTHER;
  95   95                  goto out;
  96   96          }
↓ open down ↓ 63 lines elided ↑ open up ↑
 160  160  
 161  161          if (domain != NULL)
 162  162                  (void) asprintf(&namedom, "%s@%s", name, domain);
 163  163          else
 164  164                  namedom = strdup(name);
 165  165          if (namedom == NULL) {
 166  166                  ret = IDMAP_ERR_MEMORY;
 167  167                  goto out;
 168  168          }
 169  169  
 170      -        rc = smb_lookup_name(namedom, SidTypeUnknown, &acct);
      170 +        rc = smb_lookup_lname(namedom, SidTypeUnknown, &acct);
 171  171          if (rc != 0) {
 172  172                  idmapdlog(LOG_ERR, "Error:  smb_lookup_name failed.");
 173  173                  idmapdlog(LOG_ERR,
 174  174                      "Check SMB service (svc:/network/smb/server).");
 175  175                  idmapdlog(LOG_ERR,
 176  176                      "Check connectivity to Active Directory.");
 177  177                  ret = IDMAP_ERR_OTHER;
 178  178                  goto out;
 179  179          }
 180  180          if (acct.a_status == NT_STATUS_NONE_MAPPED) {
↓ open down ↓ 68 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX