Lines Matching refs:retcode

508 			return (sqlmsgtable[i].retcode);
576 idmap_retcode retcode;
584 retcode = idmapd_string2stat(errmsg);
587 return (retcode);
606 int retcode = IDMAP_SUCCESS;
616 retcode = IDMAP_ERR_MEMORY;
630 retcode = IDMAP_ERR_MEMORY;
640 retcode = IDMAP_ERR_MEMORY;
669 retcode = IDMAP_ERR_MEMORY;
682 return (retcode);
697 idmap_retcode retcode = IDMAP_ERR_INTERNAL;
709 retcode = IDMAP_SUCCESS;
713 retcode = IDMAP_ERR_INTERNAL;
720 return (retcode);
877 idmap_stat retcode;
885 retcode = get_namerule_order(rule->winname, rule->windomain,
888 if (retcode != IDMAP_SUCCESS)
927 retcode = IDMAP_ERR_INTERNAL;
932 retcode = sql_exec_no_cb(db, IDMAP_DBNAME, sql);
934 if (retcode == IDMAP_ERR_OTHER)
935 retcode = IDMAP_ERR_CFG;
942 return (retcode);
951 idmap_stat retcode;
953 retcode = sql_exec_no_cb(db, IDMAP_DBNAME, "DELETE FROM namerules;");
955 return (retcode);
965 idmap_stat retcode;
972 retcode = gen_sql_expr_from_rule(rule, &expr);
973 if (retcode != IDMAP_SUCCESS)
979 retcode = IDMAP_ERR_INTERNAL;
985 retcode = sql_exec_no_cb(db, IDMAP_DBNAME, sql);
992 return (retcode);
1510 idmap_retcode retcode;
1518 retcode = IDMAP_ERR_INTERNAL;
1534 retcode = IDMAP_ERR_NOTSUPPORTED;
1569 retcode = IDMAP_ERR_ARG;
1574 retcode = IDMAP_ERR_MEMORY;
1577 retcode = sql_compile_n_step_once(cache, sql, &vm, &ncol,
1581 if (retcode == IDMAP_ERR_NOTFOUND) {
1583 } else if (retcode == IDMAP_SUCCESS) {
1586 retcode = IDMAP_ERR_CACHE;
1620 retcode = IDMAP_ERR_NOTFOUND;
1626 if (retcode == IDMAP_SUCCESS) {
1640 retcode = IDMAP_ERR_MEMORY;
1710 return (retcode);
1750 idmap_retcode retcode = IDMAP_SUCCESS;
1757 retcode = IDMAP_ERR_INTERNAL;
1770 retcode = IDMAP_ERR_MEMORY;
1773 retcode = sql_compile_n_step_once(cache, sql, &vm, &ncol, 3, &values);
1776 if (retcode == IDMAP_SUCCESS) {
1779 retcode = IDMAP_ERR_CACHE;
1788 retcode = IDMAP_ERR_MEMORY;
1800 retcode = IDMAP_ERR_MEMORY;
1809 return (retcode);
1823 idmap_retcode retcode;
1836 retcode = lookup_cache_sid2name(cache,
1841 retcode = lookup_cache_name2sid(cache, req->id1name,
1845 if (retcode != IDMAP_SUCCESS) {
1846 if (retcode == IDMAP_ERR_NOTFOUND) {
1849 TRACE(req, res, "Name cache lookup error=%d", retcode);
1854 return (retcode);
1880 return (retcode);
1890 idmap_retcode retcode;
1921 retcode = idmap_lookup_batch_start(dir, state->ad_nqueries,
1925 if (retcode != IDMAP_SUCCESS) {
1926 if (retcode == IDMAP_ERR_RETRIABLE_NET_ERR &&
1953 retcode = IDMAP_SUCCESS;
1966 if (res->retcode != IDMAP_ERR_RETRIABLE_NET_ERR)
2026 retcode = idmap_sid2name_batch_add1(
2036 &res->retcode);
2037 if (retcode == IDMAP_SUCCESS)
2042 retcode = idmap_name2sid_batch_add1(
2051 &res->retcode);
2052 if (retcode == IDMAP_SUCCESS)
2063 res->retcode = IDMAP_SUCCESS;
2076 retcode = idmap_sid2name_batch_add1(
2083 NULL, NULL, &res->retcode);
2084 if (retcode == IDMAP_SUCCESS)
2094 retcode = idmap_name2sid_batch_add1(
2102 &res->retcode);
2103 if (retcode == IDMAP_SUCCESS)
2125 retcode = idmap_pid2sid_batch_add1(
2133 &req->id2.idtype, &res->retcode);
2134 if (retcode == IDMAP_SUCCESS)
2152 retcode = idmap_unixname2sid_batch_add1(
2160 &req->id2.idtype, &res->retcode);
2161 if (retcode == IDMAP_SUCCESS)
2166 if (retcode == IDMAP_ERR_DOMAIN_NOTFOUND) {
2168 retcode = IDMAP_SUCCESS;
2169 } else if (retcode != IDMAP_SUCCESS) {
2174 if (retcode == IDMAP_SUCCESS) {
2177 retcode = idmap_lookup_batch_end(&qs);
2186 if (retcode == IDMAP_ERR_RETRIABLE_NET_ERR &&
2189 else if (retcode == IDMAP_ERR_RETRIABLE_NET_ERR)
2192 if (retcode != IDMAP_SUCCESS) {
2202 if (retcode != IDMAP_SUCCESS)
2252 if (retcode != IDMAP_SUCCESS) {
2253 res->retcode = retcode;
2257 if (res->retcode == IDMAP_ERR_NOTFOUND) {
2263 if (res->retcode == IDMAP_ERR_NOTFOUND) {
2267 if (res->retcode != IDMAP_SUCCESS) {
2269 res->retcode);
2313 res->retcode = IDMAP_ERR_SID;
2317 if (res->retcode == IDMAP_SUCCESS &&
2326 if (res->retcode != IDMAP_SUCCESS) {
2327 if ((!(IDMAP_FATAL_ERROR(res->retcode))) &&
2334 * res->retcode to success).
2339 if (res->retcode ==
2342 res->retcode = IDMAP_SUCCESS;
2348 res->retcode = IDMAP_SUCCESS;
2364 res->retcode = IDMAP_ERR_SID;
2371 return (retcode);
2383 idmap_retcode retcode;
2399 res->retcode != IDMAP_SUCCESS)
2403 res->retcode = IDMAP_ERR_RETRIABLE_NET_ERR;
2411 retcode = IDMAP_ERR_NO_ACTIVEDIRECTORY;
2418 res->retcode = IDMAP_ERR_NO_ACTIVEDIRECTORY;
2426 retcode = ad_lookup_batch_int(state, batch,
2437 retcode = ad_lookup_batch_int(state, batch, result,
2456 res->retcode = IDMAP_ERR_DOMAIN_NOTFOUND;
2465 return (retcode);
2500 * res->retcode =
2537 idmap_retcode retcode;
2549 retcode = IDMAP_ERR_ARG;
2569 retcode = IDMAP_ERR_MEMORY;
2577 retcode = lookup_wksids_sid2pid(req, res, &wksid);
2578 if (retcode == IDMAP_SUCCESS) {
2582 } else if (retcode != IDMAP_ERR_NOTFOUND) {
2584 "Well-known account lookup failed, code %d", retcode);
2595 retcode = lookup_localsid2pid(req, res);
2596 if (retcode == IDMAP_SUCCESS) {
2599 } else if (retcode != IDMAP_ERR_NOTFOUND) {
2601 "Local SID lookup error=%d", retcode);
2607 retcode = IDMAP_ERR_NONE_GENERATED;
2622 retcode = IDMAP_ERR_DOMAIN_NOTFOUND;
2627 retcode = IDMAP_ERR_MEMORY;
2634 retcode = lookup_cache_sid2pid(state->cache, req, res);
2635 if (retcode == IDMAP_SUCCESS) {
2638 } else if (retcode != IDMAP_ERR_NOTFOUND) {
2639 TRACE(req, res, "Mapping cache lookup error=%d", retcode);
2645 retcode = IDMAP_ERR_NONE_GENERATED;
2658 retcode = lookup_name_cache(state->cache, req, res);
2659 if (retcode == IDMAP_SUCCESS) {
2666 } else if (retcode != IDMAP_ERR_NOTFOUND)
2678 retcode = lookup_lsa_by_sid(
2682 if (retcode == IDMAP_SUCCESS) {
2684 } else if (retcode == IDMAP_ERR_NOTFOUND) {
2687 TRACE(req, res, "LSA error %d", retcode);
2696 retcode = lookup_lsa_by_name(
2702 if (retcode == IDMAP_SUCCESS) {
2708 } else if (retcode == IDMAP_ERR_NOTFOUND) {
2711 TRACE(req, res, "LSA error %d", retcode);
2732 if (retcode != IDMAP_SUCCESS ||
2737 retcode = IDMAP_SUCCESS;
2747 res->retcode = idmap_stat4prot(retcode);
2752 if (ARE_WE_DONE(req->direction) && res->retcode != IDMAP_SUCCESS)
2754 return (retcode);
3014 idmap_retcode retcode;
3070 retcode = IDMAP_ERR_MEMORY;
3075 retcode = IDMAP_ERR_INTERNAL;
3088 retcode = IDMAP_ERR_INTERNAL;
3098 retcode = IDMAP_ERR_INTERNAL;
3115 retcode = IDMAP_ERR_NOMAPPING;
3127 retcode = ns_lookup_byname(unixname, lower_unixname,
3129 if (retcode == IDMAP_SUCCESS) {
3131 } else if (retcode == IDMAP_ERR_NOTFOUND) {
3147 retcode = IDMAP_ERR_NOMAPPING;
3151 unixname, retcode);
3156 retcode = IDMAP_ERR_NOTFOUND;
3164 retcode = IDMAP_ERR_INTERNAL;
3180 retcode = IDMAP_ERR_MEMORY;
3190 if (retcode != IDMAP_SUCCESS &&
3191 retcode != IDMAP_ERR_NOTFOUND &&
3192 retcode != IDMAP_ERR_NOMAPPING) {
3193 TRACE(req, res, "Rule processing error, code=%d", retcode);
3199 if (retcode != IDMAP_ERR_NOTFOUND) {
3208 return (retcode);
3383 idmap_retcode retcode;
3388 return (res->retcode);
3391 retcode = res->retcode;
3392 if (retcode != IDMAP_SUCCESS && state->eph_map_unres_sids &&
3413 if (retcode != IDMAP_SUCCESS)
3513 retcode = ns_lookup_byname(req->id2name,
3515 if (retcode != IDMAP_SUCCESS) {
3528 "UNIX lookup error=%d", retcode);
3545 retcode = name_based_mapping_sid2pid(state, req, res);
3546 if (retcode == IDMAP_SUCCESS) {
3549 } else if (retcode != IDMAP_ERR_NOTFOUND) {
3550 TRACE(req, res, "Rule-based mapping error=%d", retcode);
3556 retcode = dynamic_ephemeral_mapping(state, req, res);
3557 if (retcode == IDMAP_SUCCESS) {
3560 } else if (retcode != IDMAP_ERR_NOTFOUND) {
3561 TRACE(req, res, "Ephemeral mapping error=%d", retcode);
3566 res->retcode = idmap_stat4prot(retcode);
3567 if (res->retcode != IDMAP_SUCCESS) {
3573 return (retcode);
3581 idmap_retcode retcode;
3596 if (res->retcode != IDMAP_SUCCESS)
3685 retcode = IDMAP_ERR_INTERNAL;
3690 retcode = sql_exec_no_cb(state->cache, IDMAP_CACHENAME, sql);
3691 if (retcode != IDMAP_SUCCESS)
3713 retcode = IDMAP_ERR_INTERNAL;
3718 retcode = sql_exec_no_cb(state->cache, IDMAP_CACHENAME, sql);
3723 return (retcode);
3731 idmap_retcode retcode;
3746 if (res->retcode != IDMAP_SUCCESS)
3766 retcode = IDMAP_ERR_INTERNAL;
3771 retcode = sql_exec_no_cb(state->cache, IDMAP_CACHENAME, sql);
3772 if (retcode != IDMAP_SUCCESS)
3835 retcode = IDMAP_ERR_INTERNAL;
3840 retcode = sql_exec_no_cb(state->cache, IDMAP_CACHENAME, sql);
3841 if (retcode != IDMAP_SUCCESS)
3863 retcode = IDMAP_ERR_INTERNAL;
3868 retcode = sql_exec_no_cb(state->cache, IDMAP_CACHENAME, sql);
3873 return (retcode);
3886 idmap_retcode retcode = IDMAP_SUCCESS;
3895 retcode = IDMAP_ERR_INTERNAL;
3923 retcode = IDMAP_ERR_ARG;
3929 retcode = IDMAP_ERR_MEMORY;
3932 retcode = sql_compile_n_step_once(
3936 if (retcode == IDMAP_ERR_NOTFOUND)
3938 else if (retcode == IDMAP_SUCCESS) {
3941 retcode = IDMAP_ERR_CACHE;
3954 retcode = IDMAP_ERR_NOTUSER;
3958 retcode = IDMAP_ERR_NOTGROUP;
3968 retcode = IDMAP_ERR_MEMORY;
3984 retcode = IDMAP_ERR_MEMORY;
3993 retcode = IDMAP_ERR_MEMORY;
3999 retcode = IDMAP_ERR_NOTSUPPORTED;
4067 return (retcode);
4102 idmap_retcode retcode;
4113 retcode = IDMAP_ERR_INTERNAL;
4128 retcode = IDMAP_ERR_MEMORY;
4131 retcode = sql_compile_n_step_once(cache, sql, &vm, &ncol, 4, &values);
4135 if (retcode != IDMAP_SUCCESS)
4140 retcode = IDMAP_ERR_CACHE;
4147 retcode = IDMAP_ERR_CACHE;
4156 retcode = IDMAP_ERR_MEMORY;
4164 retcode = IDMAP_ERR_MEMORY;
4169 retcode = IDMAP_SUCCESS;
4175 if (retcode != IDMAP_SUCCESS) {
4183 return (retcode);
4196 idmap_retcode rc, retcode;
4205 retcode = idmap_lookup_batch_start(
4211 if (retcode != IDMAP_SUCCESS) {
4212 if (retcode == IDMAP_ERR_RETRIABLE_NET_ERR &&
4217 return (retcode);
4237 retcode = idmap_name2sid_batch_add1(qs, name, domain,
4240 if (retcode == IDMAP_ERR_DOMAIN_NOTFOUND) {
4245 if (retcode != IDMAP_SUCCESS)
4248 retcode = idmap_lookup_batch_end(&qs);
4250 if (retcode == IDMAP_ERR_RETRIABLE_NET_ERR &&
4253 else if (retcode == IDMAP_ERR_RETRIABLE_NET_ERR)
4259 retcode = IDMAP_ERR_NO_ACTIVEDIRECTORY;
4263 if (retcode != IDMAP_SUCCESS) {
4268 retcode);
4269 return (retcode);
4305 idmap_retcode retcode;
4314 retcode = lookup_wksids_name2sid(name, domain, canonname, canondomain,
4316 if (retcode == IDMAP_SUCCESS) {
4319 } else if (retcode != IDMAP_ERR_NOTFOUND) {
4320 return (retcode);
4324 retcode = lookup_cache_name2sid(cache, name, domain, canonname,
4326 if (retcode == IDMAP_SUCCESS) {
4329 } else if (retcode != IDMAP_ERR_NOTFOUND) {
4330 return (retcode);
4340 return (retcode);
4345 retcode = lookup_lsa_by_name(name, domain,
4349 if (retcode == IDMAP_SUCCESS)
4351 else if (retcode != IDMAP_ERR_NOTFOUND)
4352 return (retcode);
4356 retcode = ad_lookup_by_winname(NULL, name, domain, IDMAP_POSIXID,
4358 if (retcode != IDMAP_SUCCESS)
4359 return (retcode);
4366 retcode = IDMAP_ERR_NOTUSER;
4368 retcode = IDMAP_ERR_NOTGROUP;
4375 retcode = IDMAP_ERR_SID;
4378 if (retcode == IDMAP_SUCCESS) {
4387 retcode = IDMAP_ERR_MEMORY;
4390 if (retcode != IDMAP_SUCCESS) {
4402 return (retcode);
4414 idmap_retcode retcode;
4437 retcode = IDMAP_ERR_MEMORY;
4442 retcode = IDMAP_ERR_INTERNAL;
4454 retcode = IDMAP_ERR_INTERNAL;
4465 retcode = IDMAP_ERR_INTERNAL;
4483 retcode = IDMAP_ERR_NOMAPPING;
4507 retcode = IDMAP_ERR_DOMAIN_NOTFOUND;
4511 retcode = lookup_name2sid(state->cache,
4518 if (retcode == IDMAP_SUCCESS) {
4520 } else if (retcode == IDMAP_ERR_NOTFOUND) {
4530 retcode = IDMAP_ERR_NOMAPPING;
4535 winname, windomain, retcode);
4548 retcode = IDMAP_ERR_NOTFOUND;
4556 retcode = IDMAP_ERR_INTERNAL;
4581 if (retcode != IDMAP_ERR_NOTFOUND) {
4588 return (retcode);
4618 * res->retcode =
4652 idmap_retcode retcode;
4669 retcode = IDMAP_ERR_ARG;
4673 retcode = ns_lookup_byname(req->id1name, NULL, &req->id1);
4674 if (retcode != IDMAP_SUCCESS) {
4675 TRACE(req, res, "Getting UNIX ID error=%d", retcode);
4676 retcode = IDMAP_ERR_NOMAPPING;
4683 retcode = lookup_wksids_pid2sid(req, res, is_user);
4684 if (retcode == IDMAP_SUCCESS) {
4687 } else if (retcode != IDMAP_ERR_NOTFOUND) {
4689 "Well-known account lookup error=%d", retcode);
4694 retcode = lookup_cache_pid2sid(state->cache, req, res, is_user);
4695 if (retcode == IDMAP_SUCCESS) {
4698 } else if (retcode != IDMAP_ERR_NOTFOUND) {
4700 "Mapping cache lookup error=%d", retcode);
4707 retcode = IDMAP_ERR_NOMAPPING;
4713 retcode = IDMAP_ERR_NONE_GENERATED;
4719 retcode = IDMAP_ERR_NOMAPPING;
4735 retcode = ns_lookup_bypid(req->id1.idmap_id_u.uid,
4737 if (retcode != IDMAP_SUCCESS) {
4739 "Getting UNIX name error=%d", retcode);
4763 retcode = IDMAP_SUCCESS;
4766 res->retcode = idmap_stat4prot(retcode);
4767 if (ARE_WE_DONE(req->direction) && res->retcode != IDMAP_SUCCESS) {
4777 return (retcode);
4785 idmap_retcode retcode = IDMAP_SUCCESS;
4790 return (res->retcode);
4793 retcode = res->retcode;
4794 if (retcode != IDMAP_SUCCESS)
4811 retcode = IDMAP_ERR_NOTFOUND;
4837 retcode = ns_lookup_bypid(req->id1.idmap_id_u.uid, is_user,
4839 if (retcode != IDMAP_SUCCESS) {
4841 "Getting UNIX name error=%d", retcode);
4847 retcode = ns_lookup_byname(req->id1name, NULL, &req->id1);
4848 if (retcode != IDMAP_SUCCESS) {
4850 "Getting UNIX ID error=%d", retcode);
4858 retcode = name_based_mapping_pid2sid(state, req->id1name, is_user,
4860 if (retcode == IDMAP_ERR_NOTFOUND) {
4861 retcode = generate_localsid(req, res, is_user, FALSE);
4862 if (retcode == IDMAP_SUCCESS) {
4866 "Generating local SID error=%d", retcode);
4872 res->retcode = idmap_stat4prot(retcode);
4873 if (res->retcode != IDMAP_SUCCESS) {
4892 return (retcode);