Lines Matching defs:gh

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