Lines Matching refs:gh

936 idmap_get_create(idmap_get_handle_t **gh)  in idmap_get_create()  argument
946 *gh = tmp; in idmap_get_create()
966 idmap_get_uidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, in idmap_get_uidbysid() argument
969 return (idmap_getext_uidbysid(gh, sidprefix, rid, flag, uid, in idmap_get_uidbysid()
990 idmap_getext_uidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, in idmap_getext_uidbysid() argument
997 if (gh == NULL) in idmap_getext_uidbysid()
1012 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS) in idmap_getext_uidbysid()
1016 mapping = &gh->batch.idmap_mapping_batch_val[gh->next]; in idmap_getext_uidbysid()
1027 gh->retlist[gh->next].idtype = IDMAP_UID; in idmap_getext_uidbysid()
1028 gh->retlist[gh->next].uid = uid; in idmap_getext_uidbysid()
1029 gh->retlist[gh->next].stat = stat; in idmap_getext_uidbysid()
1030 gh->retlist[gh->next].info = info; in idmap_getext_uidbysid()
1031 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE; in idmap_getext_uidbysid()
1033 gh->next++; in idmap_getext_uidbysid()
1060 idmap_get_gidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, in idmap_get_gidbysid() argument
1063 return (idmap_getext_gidbysid(gh, sidprefix, rid, flag, gid, in idmap_get_gidbysid()
1084 idmap_getext_gidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, in idmap_getext_gidbysid() argument
1092 if (gh == NULL) in idmap_getext_gidbysid()
1107 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS) in idmap_getext_gidbysid()
1111 mapping = &gh->batch.idmap_mapping_batch_val[gh->next]; in idmap_getext_gidbysid()
1122 gh->retlist[gh->next].idtype = IDMAP_GID; in idmap_getext_gidbysid()
1123 gh->retlist[gh->next].gid = gid; in idmap_getext_gidbysid()
1124 gh->retlist[gh->next].stat = stat; in idmap_getext_gidbysid()
1125 gh->retlist[gh->next].info = info; in idmap_getext_gidbysid()
1126 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE; in idmap_getext_gidbysid()
1128 gh->next++; in idmap_getext_gidbysid()
1157 idmap_get_pidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, in idmap_get_pidbysid() argument
1160 return (idmap_getext_pidbysid(gh, sidprefix, rid, flag, pid, is_user, in idmap_get_pidbysid()
1184 idmap_getext_pidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, in idmap_getext_pidbysid() argument
1191 if (gh == NULL) in idmap_getext_pidbysid()
1207 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS) in idmap_getext_pidbysid()
1211 mapping = &gh->batch.idmap_mapping_batch_val[gh->next]; in idmap_getext_pidbysid()
1222 gh->retlist[gh->next].idtype = IDMAP_POSIXID; in idmap_getext_pidbysid()
1223 gh->retlist[gh->next].uid = pid; in idmap_getext_pidbysid()
1224 gh->retlist[gh->next].gid = pid; in idmap_getext_pidbysid()
1225 gh->retlist[gh->next].is_user = is_user; in idmap_getext_pidbysid()
1226 gh->retlist[gh->next].stat = stat; in idmap_getext_pidbysid()
1227 gh->retlist[gh->next].info = info; in idmap_getext_pidbysid()
1228 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE; in idmap_getext_pidbysid()
1230 gh->next++; in idmap_getext_pidbysid()
1256 idmap_get_sidbyuid(idmap_get_handle_t *gh, uid_t uid, int flag, in idmap_get_sidbyuid() argument
1259 return (idmap_getext_sidbyuid(gh, uid, flag, sidprefix, rid, in idmap_get_sidbyuid()
1280 idmap_getext_sidbyuid(idmap_get_handle_t *gh, uid_t uid, int flag, in idmap_getext_sidbyuid() argument
1288 if (gh == NULL) in idmap_getext_sidbyuid()
1303 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS) in idmap_getext_sidbyuid()
1307 mapping = &gh->batch.idmap_mapping_batch_val[gh->next]; in idmap_getext_sidbyuid()
1314 gh->retlist[gh->next].idtype = IDMAP_SID; in idmap_getext_sidbyuid()
1315 gh->retlist[gh->next].sidprefix = sidprefix; in idmap_getext_sidbyuid()
1316 gh->retlist[gh->next].rid = rid; in idmap_getext_sidbyuid()
1317 gh->retlist[gh->next].stat = stat; in idmap_getext_sidbyuid()
1318 gh->retlist[gh->next].info = info; in idmap_getext_sidbyuid()
1319 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE; in idmap_getext_sidbyuid()
1321 gh->next++; in idmap_getext_sidbyuid()
1347 idmap_get_sidbygid(idmap_get_handle_t *gh, gid_t gid, int flag, in idmap_get_sidbygid() argument
1350 return (idmap_getext_sidbygid(gh, gid, flag, sidprefix, rid, in idmap_get_sidbygid()
1371 idmap_getext_sidbygid(idmap_get_handle_t *gh, gid_t gid, int flag, in idmap_getext_sidbygid() argument
1379 if (gh == NULL) in idmap_getext_sidbygid()
1394 if ((retcode = _get_ids_extend_batch(gh)) != IDMAP_SUCCESS) in idmap_getext_sidbygid()
1398 mapping = &gh->batch.idmap_mapping_batch_val[gh->next]; in idmap_getext_sidbygid()
1405 gh->retlist[gh->next].idtype = IDMAP_SID; in idmap_getext_sidbygid()
1406 gh->retlist[gh->next].sidprefix = sidprefix; in idmap_getext_sidbygid()
1407 gh->retlist[gh->next].rid = rid; in idmap_getext_sidbygid()
1408 gh->retlist[gh->next].stat = stat; in idmap_getext_sidbygid()
1409 gh->retlist[gh->next].info = info; in idmap_getext_sidbygid()
1410 gh->retlist[gh->next].cache_res = flag & IDMAP_REQ_FLG_USE_CACHE; in idmap_getext_sidbygid()
1412 gh->next++; in idmap_getext_sidbygid()
1429 idmap_get_mappings(idmap_get_handle_t *gh) in idmap_get_mappings() argument
1438 if (gh == NULL) { in idmap_get_mappings()
1446 (caddr_t)&gh->batch, in idmap_get_mappings()
1457 for (i = 0; i < gh->next; i++) { in idmap_get_mappings()
1459 *gh->retlist[i].stat = IDMAP_ERR_NORESULT; in idmap_get_mappings()
1462 *gh->retlist[i].stat = res.ids.ids_val[i].retcode; in idmap_get_mappings()
1465 req_id = &gh->batch.idmap_mapping_batch_val[i].id1; in idmap_get_mappings()
1468 if (gh->retlist[i].uid) in idmap_get_mappings()
1469 *gh->retlist[i].uid = res_id->idmap_id_u.uid; in idmap_get_mappings()
1470 if (gh->retlist[i].is_user) in idmap_get_mappings()
1471 *gh->retlist[i].is_user = 1; in idmap_get_mappings()
1474 gh->retlist[i].cache_res) { in idmap_get_mappings()
1475 if (gh->retlist[i].is_user != NULL) in idmap_get_mappings()
1491 if (gh->retlist[i].gid) in idmap_get_mappings()
1492 *gh->retlist[i].gid = res_id->idmap_id_u.gid; in idmap_get_mappings()
1493 if (gh->retlist[i].is_user) in idmap_get_mappings()
1494 *gh->retlist[i].is_user = 0; in idmap_get_mappings()
1497 gh->retlist[i].cache_res) { in idmap_get_mappings()
1498 if (gh->retlist[i].is_user != NULL) in idmap_get_mappings()
1514 if (gh->retlist[i].uid) in idmap_get_mappings()
1515 *gh->retlist[i].uid = 60001; in idmap_get_mappings()
1516 if (gh->retlist[i].is_user) in idmap_get_mappings()
1517 *gh->retlist[i].is_user = -1; in idmap_get_mappings()
1523 if (gh->retlist[i].rid) in idmap_get_mappings()
1524 *gh->retlist[i].rid = in idmap_get_mappings()
1526 if (gh->retlist[i].sidprefix) { in idmap_get_mappings()
1529 *gh->retlist[i].sidprefix = NULL; in idmap_get_mappings()
1532 *gh->retlist[i].sidprefix = in idmap_get_mappings()
1534 if (*gh->retlist[i].sidprefix == NULL) in idmap_get_mappings()
1535 *gh->retlist[i].stat = in idmap_get_mappings()
1539 gh->retlist[i].cache_res) { in idmap_get_mappings()
1559 *gh->retlist[i].stat = IDMAP_ERR_NORESULT; in idmap_get_mappings()
1562 if (gh->retlist[i].info != NULL) { in idmap_get_mappings()
1563 idmap_info_mov(gh->retlist[i].info, in idmap_get_mappings()
1570 _IDMAP_RESET_GET_HANDLE(gh); in idmap_get_mappings()
1581 idmap_get_destroy(idmap_get_handle_t *gh) in idmap_get_destroy() argument
1583 if (gh == NULL) in idmap_get_destroy()
1585 (void) xdr_free(xdr_idmap_mapping_batch, (caddr_t)&gh->batch); in idmap_get_destroy()
1586 if (gh->retlist) in idmap_get_destroy()
1587 free(gh->retlist); in idmap_get_destroy()
1588 free(gh); in idmap_get_destroy()