Lines Matching refs:retcode

51 	retcode = validate_list_cb_data(cb_data, argc, argv, col,\
53 if (retcode == IDMAP_NEXT) {\
54 result->retcode = IDMAP_NEXT;\
56 } else if (retcode < 0) {\
57 result->retcode = retcode;\
64 res->retcode = IDMAP_ERR_BUSY;\
66 res->retcode = IDMAP_ERR_NOTFOUND;
81 result->retcode = IDMAP_ERR_MEMORY; \
187 idmap_retcode retcode; in idmap_get_mapped_ids_1_svc() local
203 result->retcode = get_cache_handle(&cache); in idmap_get_mapped_ids_1_svc()
204 if (result->retcode != IDMAP_SUCCESS) in idmap_get_mapped_ids_1_svc()
209 result->retcode = get_db_handle(&db); in idmap_get_mapped_ids_1_svc()
210 if (result->retcode != IDMAP_SUCCESS) in idmap_get_mapped_ids_1_svc()
219 result->retcode = IDMAP_ERR_MEMORY; in idmap_get_mapped_ids_1_svc()
229 result->retcode = IDMAP_ERR_MEMORY; in idmap_get_mapped_ids_1_svc()
241 result->retcode = load_cfg_in_state(&state); in idmap_get_mapped_ids_1_svc()
242 if (result->retcode != IDMAP_SUCCESS) in idmap_get_mapped_ids_1_svc()
260 retcode = sid2pid_first_pass( in idmap_get_mapped_ids_1_svc()
265 retcode = pid2sid_first_pass( in idmap_get_mapped_ids_1_svc()
270 retcode = pid2sid_first_pass( in idmap_get_mapped_ids_1_svc()
275 res->retcode = IDMAP_ERR_IDTYPE; in idmap_get_mapped_ids_1_svc()
278 if (IDMAP_FATAL_ERROR(retcode)) { in idmap_get_mapped_ids_1_svc()
279 result->retcode = retcode; in idmap_get_mapped_ids_1_svc()
299 retcode = nldap_lookup_batch(&state, &batch, result); in idmap_get_mapped_ids_1_svc()
300 if (IDMAP_FATAL_ERROR(retcode)) { in idmap_get_mapped_ids_1_svc()
301 TRACE(req, res, "Native LDAP lookup error=%d", retcode); in idmap_get_mapped_ids_1_svc()
302 result->retcode = retcode; in idmap_get_mapped_ids_1_svc()
309 if (IDMAP_ERROR(res->retcode)) { in idmap_get_mapped_ids_1_svc()
312 res->retcode); in idmap_get_mapped_ids_1_svc()
335 retcode = ad_lookup_batch(&state, &batch, result); in idmap_get_mapped_ids_1_svc()
336 if (IDMAP_FATAL_ERROR(retcode)) { in idmap_get_mapped_ids_1_svc()
337 TRACE(req, res, "AD lookup error=%d", retcode); in idmap_get_mapped_ids_1_svc()
338 result->retcode = retcode; in idmap_get_mapped_ids_1_svc()
344 if (res->retcode == IDMAP_ERR_DOMAIN_NOTFOUND && in idmap_get_mapped_ids_1_svc()
364 res->retcode = IDMAP_SUCCESS; in idmap_get_mapped_ids_1_svc()
379 retcode = nldap_lookup_batch(&state, &batch, result); in idmap_get_mapped_ids_1_svc()
380 if (IDMAP_FATAL_ERROR(retcode)) { in idmap_get_mapped_ids_1_svc()
381 TRACE(req, res, "Native LDAP lookup error=%d", retcode); in idmap_get_mapped_ids_1_svc()
382 result->retcode = retcode; in idmap_get_mapped_ids_1_svc()
403 retcode = sid2pid_second_pass( in idmap_get_mapped_ids_1_svc()
408 retcode = pid2sid_second_pass( in idmap_get_mapped_ids_1_svc()
413 retcode = pid2sid_second_pass( in idmap_get_mapped_ids_1_svc()
421 if (IDMAP_FATAL_ERROR(retcode)) { in idmap_get_mapped_ids_1_svc()
422 result->retcode = retcode; in idmap_get_mapped_ids_1_svc()
470 if (rc == IDMAP_ERR_DB || result->retcode == IDMAP_ERR_DB) in idmap_get_mapped_ids_1_svc()
474 if (IDMAP_ERROR(result->retcode)) { in idmap_get_mapped_ids_1_svc()
480 "Failure code %d", result->retcode); in idmap_get_mapped_ids_1_svc()
495 result->retcode = idmap_stat4prot(result->retcode); in idmap_get_mapped_ids_1_svc()
502 res->retcode == IDMAP_SUCCESS) in idmap_get_mapped_ids_1_svc()
517 idmap_retcode retcode; in list_mappings_cb() local
652 result->retcode = IDMAP_SUCCESS; in list_mappings_cb()
665 idmap_retcode retcode; in idmap_list_mappings_1_svc() local
676 retcode = IDMAP_ERR_INTERNAL; in idmap_list_mappings_1_svc()
685 result->retcode = get_cache_handle(&cache); in idmap_list_mappings_1_svc()
686 if (result->retcode != IDMAP_SUCCESS) in idmap_list_mappings_1_svc()
689 result->retcode = IDMAP_ERR_INTERNAL; in idmap_list_mappings_1_svc()
717 result->retcode = IDMAP_ERR_MEMORY; in idmap_list_mappings_1_svc()
723 PROCESS_LIST_SVC_SQL(retcode, cache, IDMAP_CACHENAME, sql, limit, in idmap_list_mappings_1_svc()
726 if (retcode == IDMAP_ERR_DB) in idmap_list_mappings_1_svc()
732 if (IDMAP_ERROR(result->retcode)) in idmap_list_mappings_1_svc()
734 result->retcode = idmap_stat4prot(result->retcode); in idmap_list_mappings_1_svc()
746 idmap_retcode retcode; in list_namerules_cb() local
805 result->retcode = IDMAP_SUCCESS; in list_namerules_cb()
821 idmap_retcode retcode; in idmap_list_namerules_1_svc() local
825 result->retcode = validate_rule(&rule); in idmap_list_namerules_1_svc()
826 if (result->retcode != IDMAP_SUCCESS) in idmap_list_namerules_1_svc()
834 result->retcode = get_db_handle(&db); in idmap_list_namerules_1_svc()
835 if (result->retcode != IDMAP_SUCCESS) in idmap_list_namerules_1_svc()
838 result->retcode = gen_sql_expr_from_rule(&rule, &expr); in idmap_list_namerules_1_svc()
839 if (result->retcode != IDMAP_SUCCESS) in idmap_list_namerules_1_svc()
864 result->retcode = IDMAP_ERR_MEMORY; in idmap_list_namerules_1_svc()
870 PROCESS_LIST_SVC_SQL(retcode, db, IDMAP_DBNAME, sql, limit, in idmap_list_namerules_1_svc()
873 if (retcode == IDMAP_ERR_DB) in idmap_list_namerules_1_svc()
881 if (IDMAP_ERROR(result->retcode)) in idmap_list_namerules_1_svc()
883 result->retcode = idmap_stat4prot(result->retcode); in idmap_list_namerules_1_svc()
951 res->retcode = IDMAP_ERR_PERMISSION_DENIED; in idmap_update_1_svc()
957 res->retcode = IDMAP_SUCCESS; in idmap_update_1_svc()
961 res->retcode = validate_rules(&batch); in idmap_update_1_svc()
962 if (res->retcode != IDMAP_SUCCESS) in idmap_update_1_svc()
966 res->retcode = get_db_handle(&db); in idmap_update_1_svc()
967 if (res->retcode != IDMAP_SUCCESS) in idmap_update_1_svc()
970 res->retcode = sql_exec_no_cb(db, IDMAP_DBNAME, "BEGIN TRANSACTION;"); in idmap_update_1_svc()
971 if (res->retcode != IDMAP_SUCCESS) in idmap_update_1_svc()
979 res->retcode = IDMAP_SUCCESS; in idmap_update_1_svc()
982 res->retcode = add_namerule(db, in idmap_update_1_svc()
986 res->retcode = rm_namerule(db, in idmap_update_1_svc()
990 res->retcode = flush_namerules(db); in idmap_update_1_svc()
993 res->retcode = IDMAP_ERR_NOTSUPPORTED; in idmap_update_1_svc()
997 if (res->retcode != IDMAP_SUCCESS) { in idmap_update_1_svc()
1005 res->retcode = r2; in idmap_update_1_svc()
1013 if (res->retcode == IDMAP_SUCCESS) { in idmap_update_1_svc()
1014 res->retcode = in idmap_update_1_svc()
1017 if (res->retcode == IDMAP_SUCCESS) { in idmap_update_1_svc()
1023 res->retcode = in idmap_update_1_svc()
1034 if (res->retcode == IDMAP_ERR_DB) in idmap_update_1_svc()
1037 res->retcode = idmap_stat4prot(res->retcode); in idmap_update_1_svc()
1066 idmap_retcode retcode; in copy_id() local
1069 retcode = copy_string(&to->idmap_id_u.sid.prefix, in copy_id()
1072 return (retcode); in copy_id()
1083 idmap_retcode retcode; in copy_mapping() local
1090 retcode = copy_id(&mapping->id1, &request->id1); in copy_mapping()
1091 if (retcode != IDMAP_SUCCESS) in copy_mapping()
1094 retcode = copy_string(&mapping->id1domain, request->id1domain); in copy_mapping()
1095 if (retcode != IDMAP_SUCCESS) in copy_mapping()
1098 retcode = copy_string(&mapping->id1name, request->id1name); in copy_mapping()
1099 if (retcode != IDMAP_SUCCESS) in copy_mapping()
1102 retcode = copy_id(&mapping->id2, &request->id2); in copy_mapping()
1103 if (retcode != IDMAP_SUCCESS) in copy_mapping()
1106 retcode = copy_string(&mapping->id2domain, request->id2domain); in copy_mapping()
1107 if (retcode != IDMAP_SUCCESS) in copy_mapping()
1109 retcode = copy_string(&mapping->id2name, request->id2name); in copy_mapping()
1110 if (retcode != IDMAP_SUCCESS) in copy_mapping()
1126 return (retcode); in copy_mapping()
1143 result->retcode = validate_mapped_id_by_name_req(&request); in idmap_get_mapped_id_by_name_1_svc()
1144 if (result->retcode != IDMAP_SUCCESS) in idmap_get_mapped_id_by_name_1_svc()
1157 result->retcode = IDMAP_ERR_MEMORY; in idmap_get_mapped_id_by_name_1_svc()
1169 result->retcode = copy_mapping(map, &request); in idmap_get_mapped_id_by_name_1_svc()
1170 if (result->retcode != IDMAP_SUCCESS) in idmap_get_mapped_id_by_name_1_svc()
1183 if (batch_result.retcode != IDMAP_SUCCESS) { in idmap_get_mapped_id_by_name_1_svc()
1184 result->retcode = batch_result.retcode; in idmap_get_mapped_id_by_name_1_svc()
1188 result->retcode = copy_id(&map->id2, &batch_result.ids.ids_val[0].id); in idmap_get_mapped_id_by_name_1_svc()
1189 if (result->retcode != IDMAP_SUCCESS) in idmap_get_mapped_id_by_name_1_svc()
1194 result->retcode = batch_result.ids.ids_val[0].retcode; in idmap_get_mapped_id_by_name_1_svc()
1199 if (IDMAP_FATAL_ERROR(result->retcode)) { in idmap_get_mapped_id_by_name_1_svc()
1204 result->retcode = idmap_stat4prot(result->retcode); in idmap_get_mapped_id_by_name_1_svc()
1220 result->retcode = IDMAP_SUCCESS; in idmap_get_prop_1_svc()
1297 result->retcode = IDMAP_ERR_PROP_UNKNOWN; in idmap_get_prop_1_svc()
1303 if (IDMAP_FATAL_ERROR(result->retcode)) { in idmap_get_prop_1_svc()
1307 result->retcode = idmap_stat4prot(result->retcode); in idmap_get_prop_1_svc()