関数 | |
NTSTATUS | idmap_uid_to_sid (DOM_SID *sid, uid_t uid) |
NTSTATUS | idmap_gid_to_sid (DOM_SID *sid, gid_t gid) |
NTSTATUS | idmap_sid_to_uid (DOM_SID *sid, uid_t *uid) |
NTSTATUS | idmap_sid_to_gid (DOM_SID *sid, gid_t *gid) |
idmap_util.c の 31 行で定義されています。
参照先 unixid::id・ID_MAPPED・ID_TYPE_UID・idmap_unixids_to_sids()・id_map::sid・id_map::status・unixid::type・id_map::xid.
参照元 fill_grent_mem()・winbindd_dual_uid2sid().
00032 { 00033 NTSTATUS ret; 00034 struct id_map map; 00035 struct id_map *maps[2]; 00036 00037 DEBUG(10,("uid = [%lu]\n", (unsigned long)uid)); 00038 00039 map.sid = sid; 00040 map.xid.type = ID_TYPE_UID; 00041 map.xid.id = uid; 00042 00043 maps[0] = ↦ 00044 maps[1] = NULL; 00045 00046 ret = idmap_unixids_to_sids(maps); 00047 if ( ! NT_STATUS_IS_OK(ret)) { 00048 DEBUG(10, ("error mapping uid [%lu]\n", (unsigned long)uid)); 00049 return ret; 00050 } 00051 00052 if (map.status != ID_MAPPED) { 00053 DEBUG(10, ("uid [%lu] not mapped\n", (unsigned long)uid)); 00054 return NT_STATUS_NONE_MAPPED; 00055 } 00056 00057 return NT_STATUS_OK; 00058 }
idmap_util.c の 65 行で定義されています。
参照先 unixid::id・ID_MAPPED・ID_TYPE_GID・idmap_unixids_to_sids()・id_map::sid・id_map::status・unixid::type・id_map::xid.
00066 { 00067 NTSTATUS ret; 00068 struct id_map map; 00069 struct id_map *maps[2]; 00070 00071 DEBUG(10,("gid = [%lu]\n", (unsigned long)gid)); 00072 00073 map.sid = sid; 00074 map.xid.type = ID_TYPE_GID; 00075 map.xid.id = gid; 00076 00077 maps[0] = ↦ 00078 maps[1] = NULL; 00079 00080 ret = idmap_unixids_to_sids(maps); 00081 if ( ! NT_STATUS_IS_OK(ret)) { 00082 DEBUG(10, ("error mapping gid [%lu]\n", (unsigned long)gid)); 00083 return ret; 00084 } 00085 00086 if (map.status != ID_MAPPED) { 00087 DEBUG(10, ("gid [%lu] not mapped\n", (unsigned long)gid)); 00088 return NT_STATUS_NONE_MAPPED; 00089 } 00090 00091 return NT_STATUS_OK; 00092 }
idmap_util.c の 99 行で定義されています。
参照先 unixid::id・ID_MAPPED・ID_TYPE_UID・idmap_sids_to_unixids()・id_map::sid・sid_string_static()・id_map::status・unixid::type・id_map::xid.
参照元 winbindd_dual_sid2uid()・winbindd_fill_pwent().
00100 { 00101 NTSTATUS ret; 00102 struct id_map map; 00103 struct id_map *maps[2]; 00104 00105 DEBUG(10,("idmap_sid_to_uid: sid = [%s]\n", sid_string_static(sid))); 00106 00107 map.sid = sid; 00108 map.xid.type = ID_TYPE_UID; 00109 00110 maps[0] = ↦ 00111 maps[1] = NULL; 00112 00113 ret = idmap_sids_to_unixids(maps); 00114 if ( ! NT_STATUS_IS_OK(ret)) { 00115 DEBUG(10, ("error mapping sid [%s] to uid\n", 00116 sid_string_static(sid))); 00117 return ret; 00118 } 00119 00120 if ((map.status != ID_MAPPED) || (map.xid.type != ID_TYPE_UID)) { 00121 DEBUG(10, ("sid [%s] not mapped to an uid [%u,%u,%u]\n", 00122 sid_string_static(sid), 00123 map.status, 00124 map.xid.type, 00125 map.xid.id)); 00126 return NT_STATUS_NONE_MAPPED; 00127 } 00128 00129 *uid = map.xid.id; 00130 00131 return NT_STATUS_OK; 00132 }
idmap_util.c の 139 行で定義されています。
参照先 unixid::id・ID_MAPPED・ID_TYPE_GID・idmap_sids_to_unixids()・id_map::sid・sid_string_static()・id_map::status・unixid::type・id_map::xid.
参照元 winbindd_dual_sid2gid()・winbindd_fill_pwent()・winbindd_getgrent()・winbindd_getgrnam().
00140 { 00141 NTSTATUS ret; 00142 struct id_map map; 00143 struct id_map *maps[2]; 00144 00145 DEBUG(10,("idmap_sid_to_gid: sid = [%s]\n", sid_string_static(sid))); 00146 00147 map.sid = sid; 00148 map.xid.type = ID_TYPE_GID; 00149 00150 maps[0] = ↦ 00151 maps[1] = NULL; 00152 00153 ret = idmap_sids_to_unixids(maps); 00154 if ( ! NT_STATUS_IS_OK(ret)) { 00155 DEBUG(10, ("error mapping sid [%s] to gid\n", 00156 sid_string_static(sid))); 00157 return ret; 00158 } 00159 00160 if ((map.status != ID_MAPPED) || (map.xid.type != ID_TYPE_GID)) { 00161 DEBUG(10, ("sid [%s] not mapped to an gid [%u,%u]\n", 00162 sid_string_static(sid), 00163 map.status, 00164 map.xid.type)); 00165 return NT_STATUS_NONE_MAPPED; 00166 } 00167 00168 *gid = map.xid.id; 00169 00170 return NT_STATUS_OK; 00171 }