Print this page
NEX-18462 SMB can't view ACL if posix ID can't be mapped
Review by: Gordon Ross <gordon.ross@nexenta.com>
Review by: Evan Layton <evan.layton@nexenta.com>
        
@@ -20,10 +20,12 @@
  */
 
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright 2018 Nexenta Systems, Inc.
  */
 
 /*
  * Windows to Solaris Identity Mapping kernel API
  * This module provides an API to map Windows SIDs to
@@ -1305,10 +1307,16 @@
                             id->idmap_id_u.sid.prefix);
                         if (result->sid_prefix && result->rid) {
                                 *result->sid_prefix = sid_prefix;
                                 *result->rid = id->idmap_id_u.sid.rid;
                         }
+                        if (*result->stat == IDMAP_ERR_NOTFOUND &&
+                            sid_prefix != NULL) {
+                                /* IDMAP generated a local SID. Use it. */
+                                *result->stat = IDMAP_SUCCESS;
+                        }
+
                         if (*result->stat == IDMAP_SUCCESS &&
                             request->id1.idtype == IDMAP_UID)
                                 kidmap_cache_add_sid2uid(
                                     cache, sid_prefix,
                                     id->idmap_id_u.sid.rid,