Lines 421-430
Link Here
|
421 |
return False; |
421 |
return False; |
422 |
} |
422 |
} |
423 |
|
423 |
|
424 |
become_root_uid_only(); |
424 |
become_root(); |
425 |
result = pdb_lookup_rids(domain_sid, num_rids, rids, |
425 |
result = pdb_lookup_rids(domain_sid, num_rids, rids, |
426 |
*names, *types); |
426 |
*names, *types); |
427 |
unbecome_root_uid_only(); |
427 |
unbecome_root(); |
428 |
|
428 |
|
429 |
return (NT_STATUS_IS_OK(result) || |
429 |
return (NT_STATUS_IS_OK(result) || |
430 |
NT_STATUS_EQUAL(result, NT_STATUS_NONE_MAPPED) || |
430 |
NT_STATUS_EQUAL(result, NT_STATUS_NONE_MAPPED) || |
Lines 1085-1093
Link Here
|
1085 |
goto done; |
1085 |
goto done; |
1086 |
} |
1086 |
} |
1087 |
|
1087 |
|
1088 |
become_root_uid_only(); |
1088 |
become_root(); |
1089 |
ret = pdb_uid_to_rid(uid, &rid); |
1089 |
ret = pdb_uid_to_rid(uid, &rid); |
1090 |
unbecome_root_uid_only(); |
1090 |
unbecome_root(); |
1091 |
|
1091 |
|
1092 |
if (ret) { |
1092 |
if (ret) { |
1093 |
/* This is a mapped user */ |
1093 |
/* This is a mapped user */ |
Lines 1131-1139
Link Here
|
1131 |
goto done; |
1131 |
goto done; |
1132 |
} |
1132 |
} |
1133 |
|
1133 |
|
1134 |
become_root_uid_only(); |
1134 |
become_root(); |
1135 |
ret = pdb_gid_to_sid(gid, psid); |
1135 |
ret = pdb_gid_to_sid(gid, psid); |
1136 |
unbecome_root_uid_only(); |
1136 |
unbecome_root(); |
1137 |
|
1137 |
|
1138 |
if (ret) { |
1138 |
if (ret) { |
1139 |
/* This is a mapped group */ |
1139 |
/* This is a mapped group */ |
Lines 1179-1187
Link Here
|
1179 |
union unid_t id; |
1179 |
union unid_t id; |
1180 |
BOOL ret; |
1180 |
BOOL ret; |
1181 |
|
1181 |
|
1182 |
become_root_uid_only(); |
1182 |
become_root(); |
1183 |
ret = pdb_sid_to_id(psid, &id, &type); |
1183 |
ret = pdb_sid_to_id(psid, &id, &type); |
1184 |
unbecome_root_uid_only(); |
1184 |
unbecome_root(); |
1185 |
|
1185 |
|
1186 |
if (ret) { |
1186 |
if (ret) { |
1187 |
if (type != SID_NAME_USER) { |
1187 |
if (type != SID_NAME_USER) { |
Lines 1259-1267
Link Here
|
1259 |
sid_check_is_in_wellknown_domain(psid))) { |
1259 |
sid_check_is_in_wellknown_domain(psid))) { |
1260 |
BOOL ret; |
1260 |
BOOL ret; |
1261 |
|
1261 |
|
1262 |
become_root_uid_only(); |
1262 |
become_root(); |
1263 |
ret = pdb_getgrsid(&map, *psid); |
1263 |
ret = pdb_getgrsid(&map, *psid); |
1264 |
unbecome_root_uid_only(); |
1264 |
unbecome_root(); |
1265 |
|
1265 |
|
1266 |
if (ret) { |
1266 |
if (ret) { |
1267 |
*pgid = map.gid; |
1267 |
*pgid = map.gid; |
Lines 1273-1281
Link Here
|
1273 |
if (sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) { |
1273 |
if (sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) { |
1274 |
BOOL ret; |
1274 |
BOOL ret; |
1275 |
|
1275 |
|
1276 |
become_root_uid_only(); |
1276 |
become_root(); |
1277 |
ret = pdb_sid_to_id(psid, &id, &type); |
1277 |
ret = pdb_sid_to_id(psid, &id, &type); |
1278 |
unbecome_root_uid_only(); |
1278 |
unbecome_root(); |
1279 |
|
1279 |
|
1280 |
if (ret) { |
1280 |
if (ret) { |
1281 |
if ((type != SID_NAME_DOM_GRP) && |
1281 |
if ((type != SID_NAME_DOM_GRP) && |