Lines Matching refs:gh

937 idmap_get_create(idmap_get_handle_t **gh)  in idmap_get_create()  argument
947 *gh = tmp; in idmap_get_create()
967 idmap_get_uidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, in idmap_get_uidbysid() argument
970 return (idmap_getext_uidbysid(gh, sidprefix, rid, flag, uid, in idmap_get_uidbysid()
991 idmap_getext_uidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, in idmap_getext_uidbysid() argument
998 if (gh == NULL) in idmap_getext_uidbysid()
1013 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS) in idmap_getext_uidbysid()
1017 mapping = &gh->batch.idmap_mapping_batch_val[gh->next]; in idmap_getext_uidbysid()
1028 gh->retlist[gh->next].idtype = IDMAP_UID; in idmap_getext_uidbysid()
1029 gh->retlist[gh->next].uid = uid; in idmap_getext_uidbysid()
1030 gh->retlist[gh->next].stat = stat; in idmap_getext_uidbysid()
1031 gh->retlist[gh->next].info = info; in idmap_getext_uidbysid()
1032 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE; in idmap_getext_uidbysid()
1034 gh->next++; in idmap_getext_uidbysid()
1061 idmap_get_gidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, in idmap_get_gidbysid() argument
1064 return (idmap_getext_gidbysid(gh, sidprefix, rid, flag, gid, in idmap_get_gidbysid()
1085 idmap_getext_gidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, in idmap_getext_gidbysid() argument
1093 if (gh == NULL) in idmap_getext_gidbysid()
1108 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS) in idmap_getext_gidbysid()
1112 mapping = &gh->batch.idmap_mapping_batch_val[gh->next]; in idmap_getext_gidbysid()
1123 gh->retlist[gh->next].idtype = IDMAP_GID; in idmap_getext_gidbysid()
1124 gh->retlist[gh->next].gid = gid; in idmap_getext_gidbysid()
1125 gh->retlist[gh->next].stat = stat; in idmap_getext_gidbysid()
1126 gh->retlist[gh->next].info = info; in idmap_getext_gidbysid()
1127 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE; in idmap_getext_gidbysid()
1129 gh->next++; in idmap_getext_gidbysid()
1158 idmap_get_pidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, in idmap_get_pidbysid() argument
1161 return (idmap_getext_pidbysid(gh, sidprefix, rid, flag, pid, is_user, in idmap_get_pidbysid()
1185 idmap_getext_pidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, in idmap_getext_pidbysid() argument
1192 if (gh == NULL) in idmap_getext_pidbysid()
1208 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS) in idmap_getext_pidbysid()
1212 mapping = &gh->batch.idmap_mapping_batch_val[gh->next]; in idmap_getext_pidbysid()
1223 gh->retlist[gh->next].idtype = IDMAP_POSIXID; in idmap_getext_pidbysid()
1224 gh->retlist[gh->next].uid = pid; in idmap_getext_pidbysid()
1225 gh->retlist[gh->next].gid = pid; in idmap_getext_pidbysid()
1226 gh->retlist[gh->next].is_user = is_user; in idmap_getext_pidbysid()
1227 gh->retlist[gh->next].stat = stat; in idmap_getext_pidbysid()
1228 gh->retlist[gh->next].info = info; in idmap_getext_pidbysid()
1229 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE; in idmap_getext_pidbysid()
1231 gh->next++; in idmap_getext_pidbysid()
1257 idmap_get_sidbyuid(idmap_get_handle_t *gh, uid_t uid, int flag, in idmap_get_sidbyuid() argument
1260 return (idmap_getext_sidbyuid(gh, uid, flag, sidprefix, rid, in idmap_get_sidbyuid()
1281 idmap_getext_sidbyuid(idmap_get_handle_t *gh, uid_t uid, int flag, in idmap_getext_sidbyuid() argument
1289 if (gh == NULL) in idmap_getext_sidbyuid()
1304 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS) in idmap_getext_sidbyuid()
1308 mapping = &gh->batch.idmap_mapping_batch_val[gh->next]; in idmap_getext_sidbyuid()
1315 gh->retlist[gh->next].idtype = IDMAP_SID; in idmap_getext_sidbyuid()
1316 gh->retlist[gh->next].sidprefix = sidprefix; in idmap_getext_sidbyuid()
1317 gh->retlist[gh->next].rid = rid; in idmap_getext_sidbyuid()
1318 gh->retlist[gh->next].stat = stat; in idmap_getext_sidbyuid()
1319 gh->retlist[gh->next].info = info; in idmap_getext_sidbyuid()
1320 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE; in idmap_getext_sidbyuid()
1322 gh->next++; in idmap_getext_sidbyuid()
1348 idmap_get_sidbygid(idmap_get_handle_t *gh, gid_t gid, int flag, in idmap_get_sidbygid() argument
1351 return (idmap_getext_sidbygid(gh, gid, flag, sidprefix, rid, in idmap_get_sidbygid()
1372 idmap_getext_sidbygid(idmap_get_handle_t *gh, gid_t gid, int flag, in idmap_getext_sidbygid() argument
1380 if (gh == NULL) in idmap_getext_sidbygid()
1395 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS) in idmap_getext_sidbygid()
1399 mapping = &gh->batch.idmap_mapping_batch_val[gh->next]; in idmap_getext_sidbygid()
1406 gh->retlist[gh->next].idtype = IDMAP_SID; in idmap_getext_sidbygid()
1407 gh->retlist[gh->next].sidprefix = sidprefix; in idmap_getext_sidbygid()
1408 gh->retlist[gh->next].rid = rid; in idmap_getext_sidbygid()
1409 gh->retlist[gh->next].stat = stat; in idmap_getext_sidbygid()
1410 gh->retlist[gh->next].info = info; in idmap_getext_sidbygid()
1411 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE; in idmap_getext_sidbygid()
1413 gh->next++; in idmap_getext_sidbygid()
1430 idmap_get_mappings(idmap_get_handle_t *gh) in idmap_get_mappings() argument
1439 if (gh == NULL) { in idmap_get_mappings()
1447 (caddr_t)&gh->batch, in idmap_get_mappings()
1458 for (i = 0; i < gh->next; i++) { in idmap_get_mappings()
1460 *gh->retlist[i].stat = IDMAP_ERR_NORESULT; in idmap_get_mappings()
1463 *gh->retlist[i].stat = res.ids.ids_val[i].retcode; in idmap_get_mappings()
1466 req_id = &gh->batch.idmap_mapping_batch_val[i].id1; in idmap_get_mappings()
1469 if (gh->retlist[i].uid) in idmap_get_mappings()
1470 *gh->retlist[i].uid = res_id->idmap_id_u.uid; in idmap_get_mappings()
1471 if (gh->retlist[i].is_user) in idmap_get_mappings()
1472 *gh->retlist[i].is_user = 1; in idmap_get_mappings()
1475 gh->retlist[i].cache_res) { in idmap_get_mappings()
1476 if (gh->retlist[i].is_user != NULL) in idmap_get_mappings()
1492 if (gh->retlist[i].gid) in idmap_get_mappings()
1493 *gh->retlist[i].gid = res_id->idmap_id_u.gid; in idmap_get_mappings()
1494 if (gh->retlist[i].is_user) in idmap_get_mappings()
1495 *gh->retlist[i].is_user = 0; in idmap_get_mappings()
1498 gh->retlist[i].cache_res) { in idmap_get_mappings()
1499 if (gh->retlist[i].is_user != NULL) in idmap_get_mappings()
1515 if (gh->retlist[i].uid) in idmap_get_mappings()
1516 *gh->retlist[i].uid = 60001; in idmap_get_mappings()
1517 if (gh->retlist[i].is_user) in idmap_get_mappings()
1518 *gh->retlist[i].is_user = -1; in idmap_get_mappings()
1524 if (gh->retlist[i].rid) in idmap_get_mappings()
1525 *gh->retlist[i].rid = in idmap_get_mappings()
1527 if (gh->retlist[i].sidprefix) { in idmap_get_mappings()
1530 *gh->retlist[i].sidprefix = NULL; in idmap_get_mappings()
1533 *gh->retlist[i].sidprefix = in idmap_get_mappings()
1535 if (*gh->retlist[i].sidprefix == NULL) in idmap_get_mappings()
1536 *gh->retlist[i].stat = in idmap_get_mappings()
1540 gh->retlist[i].cache_res) { in idmap_get_mappings()
1560 *gh->retlist[i].stat = IDMAP_ERR_NORESULT; in idmap_get_mappings()
1563 if (gh->retlist[i].info != NULL) { in idmap_get_mappings()
1564 idmap_info_mov(gh->retlist[i].info, in idmap_get_mappings()
1571 _IDMAP_RESET_GET_HANDLE(gh); in idmap_get_mappings()
1582 idmap_get_destroy(idmap_get_handle_t *gh) in idmap_get_destroy() argument
1584 if (gh == NULL) in idmap_get_destroy()
1586 xdr_free(xdr_idmap_mapping_batch, (caddr_t)&gh->batch); in idmap_get_destroy()
1587 if (gh->retlist) in idmap_get_destroy()
1588 free(gh->retlist); in idmap_get_destroy()
1589 free(gh); in idmap_get_destroy()