Lines Matching refs:retcode
50 retcode = validate_list_cb_data(cb_data, argc, argv, col,\
52 if (retcode == IDMAP_NEXT) {\
53 result->retcode = IDMAP_NEXT;\
55 } else if (retcode < 0) {\
56 result->retcode = retcode;\
63 res->retcode = IDMAP_ERR_BUSY;\
65 res->retcode = IDMAP_ERR_NOTFOUND;
80 result->retcode = IDMAP_ERR_MEMORY; \
186 idmap_retcode retcode;
201 result->retcode = get_cache_handle(&cache);
202 if (result->retcode != IDMAP_SUCCESS)
207 result->retcode = get_db_handle(&db);
208 if (result->retcode != IDMAP_SUCCESS)
217 result->retcode = IDMAP_ERR_MEMORY;
227 result->retcode = IDMAP_ERR_MEMORY;
239 result->retcode = load_cfg_in_state(&state);
240 if (result->retcode != IDMAP_SUCCESS)
258 retcode = sid2pid_first_pass(
263 retcode = pid2sid_first_pass(
268 retcode = pid2sid_first_pass(
273 res->retcode = IDMAP_ERR_IDTYPE;
276 if (IDMAP_FATAL_ERROR(retcode)) {
277 result->retcode = retcode;
297 retcode = nldap_lookup_batch(&state, &batch, result);
298 if (IDMAP_FATAL_ERROR(retcode)) {
299 TRACE(req, res, "Native LDAP lookup error=%d", retcode);
300 result->retcode = retcode;
307 if (IDMAP_ERROR(res->retcode)) {
310 res->retcode);
333 retcode = ad_lookup_batch(&state, &batch, result);
334 if (IDMAP_FATAL_ERROR(retcode)) {
335 TRACE(req, res, "AD lookup error=%d", retcode);
336 result->retcode = retcode;
342 if (res->retcode == IDMAP_ERR_DOMAIN_NOTFOUND &&
362 res->retcode = IDMAP_SUCCESS;
377 retcode = nldap_lookup_batch(&state, &batch, result);
378 if (IDMAP_FATAL_ERROR(retcode)) {
379 TRACE(req, res, "Native LDAP lookup error=%d", retcode);
380 result->retcode = retcode;
401 retcode = sid2pid_second_pass(
406 retcode = pid2sid_second_pass(
411 retcode = pid2sid_second_pass(
419 if (IDMAP_FATAL_ERROR(retcode)) {
420 result->retcode = retcode;
465 if (IDMAP_ERROR(result->retcode)) {
471 "Failure code %d", result->retcode);
486 result->retcode = idmap_stat4prot(result->retcode);
493 res->retcode == IDMAP_SUCCESS)
508 idmap_retcode retcode;
643 result->retcode = IDMAP_SUCCESS;
656 idmap_retcode retcode;
667 retcode = IDMAP_ERR_INTERNAL;
676 result->retcode = get_cache_handle(&cache);
677 if (result->retcode != IDMAP_SUCCESS)
680 result->retcode = IDMAP_ERR_INTERNAL;
708 result->retcode = IDMAP_ERR_MEMORY;
714 PROCESS_LIST_SVC_SQL(retcode, cache, IDMAP_CACHENAME, sql, limit,
720 if (IDMAP_ERROR(result->retcode))
722 result->retcode = idmap_stat4prot(result->retcode);
734 idmap_retcode retcode;
793 result->retcode = IDMAP_SUCCESS;
810 idmap_retcode retcode;
814 result->retcode = validate_rule(&rule);
815 if (result->retcode != IDMAP_SUCCESS)
823 result->retcode = get_db_handle(&db);
824 if (result->retcode != IDMAP_SUCCESS)
827 result->retcode = gen_sql_expr_from_rule(&rule, &expr);
828 if (result->retcode != IDMAP_SUCCESS)
853 result->retcode = IDMAP_ERR_MEMORY;
859 PROCESS_LIST_SVC_SQL(retcode, db, IDMAP_DBNAME, sql, limit,
867 if (IDMAP_ERROR(result->retcode))
869 result->retcode = idmap_stat4prot(result->retcode);
915 * Meaning of the return values is the following: For retcode ==
937 res->retcode = IDMAP_ERR_PERMISSION_DENIED;
943 res->retcode = IDMAP_SUCCESS;
947 res->retcode = validate_rules(&batch);
948 if (res->retcode != IDMAP_SUCCESS)
952 res->retcode = get_db_handle(&db);
953 if (res->retcode != IDMAP_SUCCESS)
956 res->retcode = sql_exec_no_cb(db, IDMAP_DBNAME, "BEGIN TRANSACTION;");
957 if (res->retcode != IDMAP_SUCCESS)
965 res->retcode = IDMAP_SUCCESS;
968 res->retcode = add_namerule(db,
972 res->retcode = rm_namerule(db,
976 res->retcode = flush_namerules(db);
979 res->retcode = IDMAP_ERR_NOTSUPPORTED;
983 if (res->retcode != IDMAP_SUCCESS) {
991 res->retcode = r2;
999 if (res->retcode == IDMAP_SUCCESS) {
1000 res->retcode =
1003 if (res->retcode == IDMAP_SUCCESS) {
1009 res->retcode =
1020 res->retcode = idmap_stat4prot(res->retcode);
1049 idmap_retcode retcode;
1052 retcode = copy_string(&to->idmap_id_u.sid.prefix,
1055 return (retcode);
1066 idmap_retcode retcode;
1073 retcode = copy_id(&mapping->id1, &request->id1);
1074 if (retcode != IDMAP_SUCCESS)
1077 retcode = copy_string(&mapping->id1domain, request->id1domain);
1078 if (retcode != IDMAP_SUCCESS)
1081 retcode = copy_string(&mapping->id1name, request->id1name);
1082 if (retcode != IDMAP_SUCCESS)
1085 retcode = copy_id(&mapping->id2, &request->id2);
1086 if (retcode != IDMAP_SUCCESS)
1089 retcode = copy_string(&mapping->id2domain, request->id2domain);
1090 if (retcode != IDMAP_SUCCESS)
1092 retcode = copy_string(&mapping->id2name, request->id2name);
1093 if (retcode != IDMAP_SUCCESS)
1109 return (retcode);
1126 result->retcode = validate_mapped_id_by_name_req(&request);
1127 if (result->retcode != IDMAP_SUCCESS)
1140 result->retcode = IDMAP_ERR_MEMORY;
1152 result->retcode = copy_mapping(map, &request);
1153 if (result->retcode != IDMAP_SUCCESS)
1166 if (batch_result.retcode != IDMAP_SUCCESS) {
1167 result->retcode = batch_result.retcode;
1171 result->retcode = copy_id(&map->id2, &batch_result.ids.ids_val[0].id);
1172 if (result->retcode != IDMAP_SUCCESS)
1177 result->retcode = batch_result.ids.ids_val[0].retcode;
1182 if (IDMAP_FATAL_ERROR(result->retcode)) {
1187 result->retcode = idmap_stat4prot(result->retcode);
1203 result->retcode = IDMAP_SUCCESS;
1280 result->retcode = IDMAP_ERR_PROP_UNKNOWN;
1286 if (IDMAP_FATAL_ERROR(result->retcode)) {
1290 result->retcode = idmap_stat4prot(result->retcode);