Lines Matching defs:gh

936  * gh - "get mapping" handle
939 idmap_get_create(idmap_get_handle_t **gh)
949 *gh = tmp;
969 idmap_get_uidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
972 return (idmap_getext_uidbysid(gh, sidprefix, rid, flag, uid,
993 idmap_getext_uidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
1000 if (gh == NULL)
1015 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS)
1019 mapping = &gh->batch.idmap_mapping_batch_val[gh->next];
1030 gh->retlist[gh->next].idtype = IDMAP_UID;
1031 gh->retlist[gh->next].uid = uid;
1032 gh->retlist[gh->next].stat = stat;
1033 gh->retlist[gh->next].info = info;
1034 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE;
1036 gh->next++;
1063 idmap_get_gidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
1066 return (idmap_getext_gidbysid(gh, sidprefix, rid, flag, gid,
1087 idmap_getext_gidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
1095 if (gh == NULL)
1110 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS)
1114 mapping = &gh->batch.idmap_mapping_batch_val[gh->next];
1125 gh->retlist[gh->next].idtype = IDMAP_GID;
1126 gh->retlist[gh->next].gid = gid;
1127 gh->retlist[gh->next].stat = stat;
1128 gh->retlist[gh->next].info = info;
1129 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE;
1131 gh->next++;
1160 idmap_get_pidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
1163 return (idmap_getext_pidbysid(gh, sidprefix, rid, flag, pid, is_user,
1187 idmap_getext_pidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid,
1194 if (gh == NULL)
1210 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS)
1214 mapping = &gh->batch.idmap_mapping_batch_val[gh->next];
1225 gh->retlist[gh->next].idtype = IDMAP_POSIXID;
1226 gh->retlist[gh->next].uid = pid;
1227 gh->retlist[gh->next].gid = pid;
1228 gh->retlist[gh->next].is_user = is_user;
1229 gh->retlist[gh->next].stat = stat;
1230 gh->retlist[gh->next].info = info;
1231 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE;
1233 gh->next++;
1259 idmap_get_sidbyuid(idmap_get_handle_t *gh, uid_t uid, int flag,
1262 return (idmap_getext_sidbyuid(gh, uid, flag, sidprefix, rid,
1283 idmap_getext_sidbyuid(idmap_get_handle_t *gh, uid_t uid, int flag,
1291 if (gh == NULL)
1306 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS)
1310 mapping = &gh->batch.idmap_mapping_batch_val[gh->next];
1317 gh->retlist[gh->next].idtype = IDMAP_SID;
1318 gh->retlist[gh->next].sidprefix = sidprefix;
1319 gh->retlist[gh->next].rid = rid;
1320 gh->retlist[gh->next].stat = stat;
1321 gh->retlist[gh->next].info = info;
1322 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE;
1324 gh->next++;
1350 idmap_get_sidbygid(idmap_get_handle_t *gh, gid_t gid, int flag,
1353 return (idmap_getext_sidbygid(gh, gid, flag, sidprefix, rid,
1374 idmap_getext_sidbygid(idmap_get_handle_t *gh, gid_t gid, int flag,
1382 if (gh == NULL)
1397 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS)
1401 mapping = &gh->batch.idmap_mapping_batch_val[gh->next];
1408 gh->retlist[gh->next].idtype = IDMAP_SID;
1409 gh->retlist[gh->next].sidprefix = sidprefix;
1410 gh->retlist[gh->next].rid = rid;
1411 gh->retlist[gh->next].stat = stat;
1412 gh->retlist[gh->next].info = info;
1413 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE;
1415 gh->next++;
1432 idmap_get_mappings(idmap_get_handle_t *gh)
1441 if (gh == NULL) {
1449 (caddr_t)&gh->batch,
1460 for (i = 0; i < gh->next; i++) {
1462 *gh->retlist[i].stat = IDMAP_ERR_NORESULT;
1465 *gh->retlist[i].stat = res.ids.ids_val[i].retcode;
1468 req_id = &gh->batch.idmap_mapping_batch_val[i].id1;
1471 if (gh->retlist[i].uid)
1472 *gh->retlist[i].uid = res_id->idmap_id_u.uid;
1473 if (gh->retlist[i].is_user)
1474 *gh->retlist[i].is_user = 1;
1477 gh->retlist[i].cache_res) {
1478 if (gh->retlist[i].is_user != NULL)
1494 if (gh->retlist[i].gid)
1495 *gh->retlist[i].gid = res_id->idmap_id_u.gid;
1496 if (gh->retlist[i].is_user)
1497 *gh->retlist[i].is_user = 0;
1500 gh->retlist[i].cache_res) {
1501 if (gh->retlist[i].is_user != NULL)
1517 if (gh->retlist[i].uid)
1518 *gh->retlist[i].uid = 60001;
1519 if (gh->retlist[i].is_user)
1520 *gh->retlist[i].is_user = -1;
1526 if (gh->retlist[i].rid)
1527 *gh->retlist[i].rid =
1529 if (gh->retlist[i].sidprefix) {
1532 *gh->retlist[i].sidprefix = NULL;
1535 *gh->retlist[i].sidprefix =
1537 if (*gh->retlist[i].sidprefix == NULL)
1538 *gh->retlist[i].stat =
1542 gh->retlist[i].cache_res) {
1562 *gh->retlist[i].stat = IDMAP_ERR_NORESULT;
1565 if (gh->retlist[i].info != NULL) {
1566 idmap_info_mov(gh->retlist[i].info,
1573 _IDMAP_RESET_GET_HANDLE(gh);
1584 idmap_get_destroy(idmap_get_handle_t *gh)
1586 if (gh == NULL)
1588 (void) xdr_free(xdr_idmap_mapping_batch, (caddr_t)&gh->batch);
1589 if (gh->retlist)
1590 free(gh->retlist);
1591 free(gh);