Lines Matching refs:tmp_ctx
166 TALLOC_CTX *tmp_ctx;
168 tmp_ctx = talloc_new(NULL);
169 if (!tmp_ctx) {
179 ret = sysdb_search_entry(tmp_ctx, sysdb, dn,
215 talloc_free(tmp_ctx);
231 TALLOC_CTX *tmp_ctx;
235 tmp_ctx = talloc_new(NULL);
236 if (tmp_ctx == NULL) {
241 ret = ldb_search(ldb, tmp_ctx, &res,
258 talloc_zfree(tmp_ctx);
317 TALLOC_CTX *tmp_ctx;
325 tmp_ctx = talloc_new(NULL);
326 if (!tmp_ctx) {
330 basedn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb,
337 filter = talloc_asprintf(tmp_ctx, filter_str, sid_str);
343 ret = sysdb_search_entry(tmp_ctx, domain->sysdb, basedn, LDB_SCOPE_SUBTREE,
360 talloc_zfree(tmp_ctx);
379 TALLOC_CTX *tmp_ctx;
406 tmp_ctx = talloc_new(NULL);
407 if (!tmp_ctx) {
411 basedn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb,
418 ret = sss_filter_sanitize_for_dom(tmp_ctx, name, domain, &sanitized_name,
424 filter = talloc_asprintf(tmp_ctx, filter_tmpl, lc_sanitized_name,
431 ret = sysdb_search_entry(tmp_ctx, domain->sysdb, basedn, LDB_SCOPE_SUBTREE,
452 talloc_zfree(tmp_ctx);
471 TALLOC_CTX *tmp_ctx;
479 tmp_ctx = talloc_new(NULL);
480 if (!tmp_ctx) {
484 basedn = sysdb_user_base_dn(tmp_ctx, domain);
490 filter = talloc_asprintf(tmp_ctx, SYSDB_PWUID_FILTER, (unsigned long)uid);
500 ret = sysdb_search_entry(tmp_ctx, domain->sysdb, basedn,
517 talloc_zfree(tmp_ctx);
540 TALLOC_CTX *tmp_ctx;
547 tmp_ctx = talloc_new(NULL);
548 if (tmp_ctx == NULL) {
553 base_dn = sysdb_base_dn(domain->sysdb, tmp_ctx);
559 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res,
591 talloc_zfree(tmp_ctx);
601 TALLOC_CTX *tmp_ctx;
605 tmp_ctx = talloc_new(NULL);
606 if (tmp_ctx == NULL) {
611 ret = sysdb_search_user_by_upn_res(tmp_ctx, domain, upn, attrs, &res);
625 talloc_zfree(tmp_ctx);
646 TALLOC_CTX *tmp_ctx;
654 tmp_ctx = talloc_new(NULL);
655 if (!tmp_ctx) {
659 basedn = sysdb_group_base_dn(tmp_ctx, domain);
665 filter = talloc_asprintf(tmp_ctx, SYSDB_GRGID_FILTER, (unsigned long)gid);
675 ret = sysdb_search_entry(tmp_ctx, domain->sysdb, basedn, LDB_SCOPE_SUBTREE,
692 talloc_zfree(tmp_ctx);
717 TALLOC_CTX *tmp_ctx;
724 tmp_ctx = talloc_new(NULL);
725 if (!tmp_ctx) {
729 basedn = sysdb_netgroup_dn(tmp_ctx, domain, name);
735 ret = sysdb_search_entry(tmp_ctx, domain->sysdb, basedn, LDB_SCOPE_BASE,
751 talloc_zfree(tmp_ctx);
766 TALLOC_CTX *tmp_ctx;
775 tmp_ctx = talloc_new(NULL);
776 if (tmp_ctx == NULL) {
781 ret = sysdb_search_ts_entry(tmp_ctx,
810 talloc_zfree(tmp_ctx);
826 TALLOC_CTX *tmp_ctx;
832 tmp_ctx = talloc_new(NULL);
833 if (tmp_ctx == NULL) {
842 msg = sysdb_attrs2msg(tmp_ctx, entry_dn, attrs, 0);
862 talloc_zfree(tmp_ctx);
907 TALLOC_CTX *tmp_ctx;
915 tmp_ctx = talloc_new(NULL);
916 if (tmp_ctx == NULL) {
921 ts_attrs = sysdb_new_attrs(tmp_ctx);
969 talloc_free(tmp_ctx);
1047 TALLOC_CTX *tmp_ctx;
1050 tmp_ctx = talloc_new(NULL);
1051 if (!tmp_ctx) {
1055 ret = get_sysdb_obj_dn(tmp_ctx, domain, obj_type, obj_name, &entry_dn);
1063 talloc_zfree(tmp_ctx);
1075 TALLOC_CTX *tmp_ctx;
1082 tmp_ctx = talloc_new(NULL);
1083 if (tmp_ctx == NULL) {
1087 ret = get_sysdb_obj_dn(tmp_ctx, domain, obj_type, obj_name, &entry_dn);
1092 ts_attrs = ts_obj_attrs(tmp_ctx, obj_type);
1105 talloc_zfree(tmp_ctx);
1146 TALLOC_CTX *tmp_ctx;
1148 tmp_ctx = talloc_new(NULL);
1149 if (!tmp_ctx) {
1158 msg = sysdb_attrs2msg(tmp_ctx, entry_dn, attrs, mod_op);
1180 talloc_zfree(tmp_ctx);
1260 TALLOC_CTX *tmp_ctx;
1267 tmp_ctx = talloc_new(NULL);
1268 if (!tmp_ctx) {
1272 ts_attrs = sysdb_filter_ts_attrs(tmp_ctx, attrs);
1291 talloc_zfree(tmp_ctx);
1303 TALLOC_CTX *tmp_ctx;
1306 tmp_ctx = talloc_new(NULL);
1307 if (!tmp_ctx) {
1311 dn = sysdb_user_dn(tmp_ctx, domain, name);
1324 talloc_zfree(tmp_ctx);
1336 TALLOC_CTX *tmp_ctx;
1339 tmp_ctx = talloc_new(NULL);
1340 if (!tmp_ctx) {
1345 dn = sysdb_group_dn(tmp_ctx, domain, name);
1358 talloc_free(tmp_ctx);
1371 TALLOC_CTX *tmp_ctx;
1373 tmp_ctx = talloc_new(NULL);
1374 if (!tmp_ctx) {
1378 dn = sysdb_netgroup_dn(tmp_ctx, domain, name);
1387 talloc_free(tmp_ctx);
1396 TALLOC_CTX *tmp_ctx;
1409 tmp_ctx = talloc_new(NULL);
1410 if (!tmp_ctx) {
1414 base_dn = sysdb_domain_dn(tmp_ctx, domain);
1416 talloc_zfree(tmp_ctx);
1422 talloc_zfree(tmp_ctx);
1427 ret = sysdb_search_entry(tmp_ctx, domain->sysdb, base_dn, LDB_SCOPE_BASE,
1466 filter = talloc_asprintf(tmp_ctx,
1474 filter = talloc_asprintf(tmp_ctx,
1485 ret = sysdb_search_entry(tmp_ctx, domain->sysdb, base_dn, LDB_SCOPE_SUBTREE,
1524 msg = ldb_msg_new(tmp_ctx);
1557 talloc_zfree(tmp_ctx);
1573 TALLOC_CTX *tmp_ctx;
1575 tmp_ctx = talloc_new(NULL);
1576 if (!tmp_ctx) {
1580 msg = ldb_msg_new(tmp_ctx);
1636 talloc_zfree(tmp_ctx);
1648 TALLOC_CTX *tmp_ctx;
1655 tmp_ctx = talloc_new(NULL);
1656 if (!tmp_ctx) {
1660 msg = ldb_msg_new(tmp_ctx);
1727 talloc_free(tmp_ctx);
1737 TALLOC_CTX *tmp_ctx;
1749 tmp_ctx = talloc_new(NULL);
1750 if (!tmp_ctx) {
1754 ret = sss_filter_sanitize(tmp_ctx, name, &sanitized_name);
1759 filter = talloc_asprintf(tmp_ctx, "(|(%s=%s)",
1788 tmpdn = sysdb_user_dn(tmp_ctx, domain, name);
1800 tmpdn = ldb_dn_new(tmp_ctx, domain->sysdb->ldb, SYSDB_BASE);
1811 ret = sysdb_search_entry(tmp_ctx, domain->sysdb, tmpdn, LDB_SCOPE_SUBTREE,
1825 talloc_free(tmp_ctx);
1842 TALLOC_CTX *tmp_ctx;
1873 tmp_ctx = talloc_new(NULL);
1874 if (!tmp_ctx) {
1881 talloc_free(tmp_ctx);
1891 ret = sysdb_search_group_by_name(tmp_ctx, domain, name, NULL, &msg);
1900 ret = sysdb_search_user_by_uid(tmp_ctx, domain, uid, NULL, &msg);
1922 id_attrs = sysdb_new_attrs(tmp_ctx);
1941 attrs = sysdb_new_attrs(tmp_ctx);
1983 talloc_zfree(tmp_ctx);
1994 TALLOC_CTX *tmp_ctx;
1996 tmp_ctx = talloc_new(NULL);
1997 if (!tmp_ctx) {
2001 msg = ldb_msg_new(tmp_ctx);
2033 talloc_zfree(tmp_ctx);
2046 TALLOC_CTX *tmp_ctx;
2060 tmp_ctx = talloc_new(NULL);
2061 if (!tmp_ctx) {
2068 talloc_free(tmp_ctx);
2078 ret = sysdb_search_user_by_name(tmp_ctx, domain, name, NULL, &msg);
2094 ret = sysdb_search_group_by_gid(tmp_ctx, domain, gid, NULL, &msg);
2126 attrs = sysdb_new_attrs(tmp_ctx);
2193 talloc_zfree(tmp_ctx);
2206 TALLOC_CTX *tmp_ctx;
2210 tmp_ctx = talloc_new(NULL);
2211 if (!tmp_ctx) {
2230 attrs = sysdb_new_attrs(tmp_ctx);
2267 talloc_zfree(tmp_ctx);
2376 TALLOC_CTX *tmp_ctx;
2379 tmp_ctx = talloc_new(NULL);
2380 if (!tmp_ctx) {
2387 talloc_free(tmp_ctx);
2396 attrs = sysdb_new_attrs(tmp_ctx);
2436 talloc_zfree(tmp_ctx);
2484 TALLOC_CTX *tmp_ctx;
2495 tmp_ctx = talloc_new(NULL);
2496 if (!tmp_ctx) {
2501 attrs = sysdb_new_attrs(tmp_ctx);
2521 ret = sysdb_search_user_by_name(tmp_ctx, domain, name, NULL, &msg);
2563 talloc_zfree(tmp_ctx);
2707 TALLOC_CTX *tmp_ctx;
2729 tmp_ctx = talloc_new(NULL);
2730 if (!tmp_ctx) {
2741 ret = sysdb_search_group_by_name(tmp_ctx, domain, name, src_attrs, &msg);
2754 attrs = sysdb_new_attrs(tmp_ctx);
2792 talloc_zfree(tmp_ctx);
2897 TALLOC_CTX *tmp_ctx = talloc_new(NULL);
2898 if (!tmp_ctx) {
2902 ret = sss_parse_internal_fqname(tmp_ctx, member,
2921 member_dn = sysdb_user_dn(tmp_ctx, member_dom, member);
2923 member_dn = sysdb_group_dn(tmp_ctx, member_dom, member);
2935 group_dn = sysdb_group_dn(tmp_ctx, domain, group);
2937 group_dn = ldb_dn_new(tmp_ctx, domain->sysdb->ldb, group);
2948 talloc_free(tmp_ctx);
2984 TALLOC_CTX *tmp_ctx;
2990 tmp_ctx = talloc_new(NULL);
2991 if (!tmp_ctx) {
2995 ret = s3crypt_gen_salt(tmp_ctx, &salt);
3001 ret = s3crypt_sha512(tmp_ctx, password, salt, &hash);
3007 attrs = sysdb_new_attrs(tmp_ctx);
3037 talloc_zfree(tmp_ctx);
3044 talloc_zfree(tmp_ctx);
3066 TALLOC_CTX *tmp_ctx;
3070 tmp_ctx = talloc_new(NULL);
3071 if (tmp_ctx == NULL) {
3081 basedn = sysdb_custom_subtree_dn(tmp_ctx, domain, subtree_name);
3097 talloc_free(tmp_ctx);
3109 TALLOC_CTX *tmp_ctx;
3119 tmp_ctx = talloc_new(NULL);
3120 if (!tmp_ctx) {
3124 basedn = sysdb_custom_dn(tmp_ctx, domain, object_name, subtree_name);
3136 ret = sysdb_search_entry(tmp_ctx, domain->sysdb, basedn,
3152 talloc_zfree(tmp_ctx);
3164 TALLOC_CTX *tmp_ctx;
3183 tmp_ctx = talloc_new(NULL);
3184 if (!tmp_ctx) {
3189 ret = sysdb_search_custom_by_name(tmp_ctx, domain,
3200 msg = ldb_msg_new(tmp_ctx);
3206 msg->dn = sysdb_custom_dn(tmp_ctx, domain, object_name, subtree_name);
3253 talloc_zfree(tmp_ctx);
3263 TALLOC_CTX *tmp_ctx;
3271 tmp_ctx = talloc_new(NULL);
3272 if (!tmp_ctx) {
3276 dn = sysdb_custom_dn(tmp_ctx, domain, object_name, subtree_name);
3299 talloc_zfree(tmp_ctx);
3314 TALLOC_CTX *tmp_ctx;
3321 tmp_ctx = talloc_new(NULL);
3322 if (!tmp_ctx) {
3326 ctrl = talloc_array(tmp_ctx, struct ldb_control *, 2);
3357 res = talloc_zero(tmp_ctx, struct ldb_result);
3363 ret = ldb_build_search_req(&ldb_req, domain->sysdb->ldb, tmp_ctx,
3384 talloc_zfree(tmp_ctx);
3394 talloc_zfree(tmp_ctx);
3408 TALLOC_CTX *tmp_ctx;
3413 tmp_ctx = talloc_new(NULL);
3414 if (!tmp_ctx) {
3418 basedn = sysdb_user_base_dn(tmp_ctx, domain);
3425 filter = talloc_asprintf(tmp_ctx, "(&(%s)%s)", SYSDB_UC, sub_filter);
3442 talloc_zfree(tmp_ctx);
3452 talloc_zfree(tmp_ctx);
3510 TALLOC_CTX *tmp_ctx;
3520 tmp_ctx = talloc_new(NULL);
3521 if (!tmp_ctx) {
3526 ret = sysdb_search_user_by_name(tmp_ctx, domain, name, NULL, &msg);
3528 ret = sysdb_search_user_by_uid(tmp_ctx, domain, uid, NULL, &msg);
3557 ret = sss_filter_sanitize(tmp_ctx, name, &sanitized_name);
3562 filter = talloc_asprintf(tmp_ctx, "(%s=%s)",
3569 ret = sysdb_search_groups(tmp_ctx, domain, filter, attrs,
3576 msg = ldb_msg_new(tmp_ctx);
3605 talloc_zfree(tmp_ctx);
3610 talloc_zfree(tmp_ctx);
3625 TALLOC_CTX *tmp_ctx;
3630 tmp_ctx = talloc_new(NULL);
3631 if (!tmp_ctx) {
3635 basedn = sysdb_group_base_dn(tmp_ctx, domain);
3642 filter = talloc_asprintf(tmp_ctx, "(&(%s)%s)", SYSDB_GC, sub_filter);
3659 talloc_zfree(tmp_ctx);
3669 talloc_zfree(tmp_ctx);
3727 TALLOC_CTX *tmp_ctx;
3731 tmp_ctx = talloc_new(NULL);
3732 if (!tmp_ctx) {
3737 ret = sysdb_search_group_by_name(tmp_ctx, domain, name, NULL, &msg);
3739 ret = sysdb_search_group_by_gid(tmp_ctx, domain, gid, NULL, &msg);
3770 talloc_zfree(tmp_ctx);
3775 talloc_zfree(tmp_ctx);
3788 TALLOC_CTX *tmp_ctx;
3793 tmp_ctx = talloc_new(NULL);
3794 if (!tmp_ctx) {
3798 basedn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb,
3806 filter = talloc_asprintf(tmp_ctx, "(&(%s)%s)", SYSDB_NC, sub_filter);
3822 talloc_zfree(tmp_ctx);
3831 talloc_zfree(tmp_ctx);
3840 TALLOC_CTX *tmp_ctx;
3846 tmp_ctx = talloc_new(NULL);
3847 if (!tmp_ctx) {
3851 ret = sysdb_search_netgroup_by_name(tmp_ctx, domain, name, NULL, &msg);
3873 talloc_free(tmp_ctx);
3881 TALLOC_CTX *tmp_ctx;
3887 tmp_ctx = talloc_new(NULL);
3888 if (!tmp_ctx) {
3892 ret = sysdb_search_object_by_sid(tmp_ctx, domain, sid_str, NULL, &res);
3922 talloc_free(tmp_ctx);
3939 TALLOC_CTX *tmp_ctx;
3941 tmp_ctx = talloc_new(NULL);
3942 if (!tmp_ctx) {
4001 talloc_free(tmp_ctx);
4016 TALLOC_CTX *tmp_ctx;
4040 tmp_ctx = talloc_new(NULL);
4041 if (tmp_ctx == NULL) {
4046 short_pw = talloc_strndup(tmp_ctx, password, (pw_len - cached_fa2_len));
4053 ret = s3crypt_sha512(tmp_ctx, short_pw, userhash, &comphash);
4070 talloc_free(tmp_ctx);
4083 TALLOC_CTX *tmp_ctx;
4122 tmp_ctx = talloc_new(NULL);
4123 if (!tmp_ctx) {
4129 talloc_zfree(tmp_ctx);
4134 ret = sysdb_search_user_by_name(tmp_ctx, domain, name, attrs, &ldb_msg);
4186 ret = s3crypt_sha512(tmp_ctx, password, userhash, &comphash);
4193 update_attrs = sysdb_new_attrs(tmp_ctx);
4281 talloc_free(tmp_ctx);
4297 TALLOC_CTX *tmp_ctx = talloc_new(NULL);
4298 if(!tmp_ctx) {
4353 talloc_free(tmp_ctx);
4481 TALLOC_CTX *tmp_ctx;
4490 tmp_ctx = talloc_new(NULL);
4491 if (!tmp_ctx) {
4495 basedn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb, SYSDB_DOM_BASE,
4503 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res,
4539 talloc_zfree(tmp_ctx);
4651 TALLOC_CTX *tmp_ctx;
4658 tmp_ctx = talloc_new(NULL);
4659 if (tmp_ctx == NULL) {
4663 ret = sysdb_search_group_by_name(tmp_ctx, dom, group_name, NULL, &msg);
4669 ret = sysdb_asq_search(tmp_ctx, dom, msg->dn, NULL, SYSDB_MEMBER, attrs,
4675 sids = talloc_array(tmp_ctx, const char*, m_count);
4681 dns = talloc_array(tmp_ctx, const char*, m_count);
4721 talloc_free(tmp_ctx);
4730 TALLOC_CTX *tmp_ctx;
4740 tmp_ctx = talloc_new(NULL);
4741 if (tmp_ctx == NULL) {
4745 base_dn = sysdb_base_dn(dom->sysdb, tmp_ctx);
4752 ret = sss_filter_sanitize(tmp_ctx, ldb_dn_get_linearized(group_dn),
4761 filter = talloc_asprintf(tmp_ctx, "(&("SYSDB_UC")("SYSDB_MEMBEROF"=%s))",
4769 ret = sysdb_search_entry(tmp_ctx, dom->sysdb, base_dn, LDB_SCOPE_SUBTREE,
4775 res = talloc_zero(tmp_ctx, struct ldb_result);
4795 talloc_free(tmp_ctx);
4862 TALLOC_CTX *tmp_ctx;
4864 tmp_ctx = talloc_new(NULL);
4865 if (tmp_ctx == NULL) {
4869 msg = ldb_msg_new(tmp_ctx);
4899 talloc_free(tmp_ctx);
4908 TALLOC_CTX *tmp_ctx;
4910 tmp_ctx = talloc_new(NULL);
4911 if (tmp_ctx == NULL) {
4915 ldbdn = ldb_dn_from_ldb_val(tmp_ctx, dom->sysdb->ldb, dn_val);
4924 talloc_free(tmp_ctx);