Lines Matching refs:tmp_ctx

76     TALLOC_CTX *tmp_ctx;
86 tmp_ctx = talloc_new(NULL);
87 if (tmp_ctx == NULL) {
91 ret = sysdb_search_ts_entry(tmp_ctx, sysdb, sysdb_msg->dn,
132 talloc_zfree(tmp_ctx);
187 TALLOC_CTX *tmp_ctx;
195 tmp_ctx = talloc_new(NULL);
196 if (!tmp_ctx) {
200 base_dn = sysdb_user_base_dn(tmp_ctx, domain);
206 ret = sss_filter_sanitize_for_dom(tmp_ctx, name, domain,
212 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
231 talloc_zfree(tmp_ctx);
243 TALLOC_CTX *tmp_ctx;
245 tmp_ctx = talloc_new(NULL);
246 if (tmp_ctx == NULL) {
253 ret = sysdb_search_user_override_by_name(tmp_ctx, domain, name,
265 ret = sysdb_getpwnam(tmp_ctx, domain, name, &orig_obj);
299 talloc_free(tmp_ctx);
308 TALLOC_CTX *tmp_ctx;
315 tmp_ctx = talloc_new(NULL);
316 if (!tmp_ctx) {
320 base_dn = sysdb_user_base_dn(tmp_ctx, domain);
326 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
343 talloc_zfree(tmp_ctx);
355 TALLOC_CTX *tmp_ctx;
357 tmp_ctx = talloc_new(NULL);
358 if (tmp_ctx == NULL) {
365 ret = sysdb_search_user_override_by_uid(tmp_ctx, domain, uid,
377 ret = sysdb_getpwuid(tmp_ctx, domain, uid, &orig_obj);
411 talloc_free(tmp_ctx);
421 TALLOC_CTX *tmp_ctx = NULL;
423 tmp_ctx = talloc_new(NULL);
424 if (tmp_ctx == NULL) {
429 filter = talloc_strdup(tmp_ctx, base_filter);
431 filter = talloc_asprintf(tmp_ctx, "(&%s", base_filter);
451 talloc_free(tmp_ctx);
460 TALLOC_CTX *tmp_ctx;
465 tmp_ctx = talloc_new(NULL);
466 if (tmp_ctx == NULL) {
471 ret = sysdb_search_user_by_upn_res(tmp_ctx, domain, upn, attrs, &res);
480 talloc_free(tmp_ctx);
492 TALLOC_CTX *tmp_ctx = NULL;
502 tmp_ctx = talloc_new(NULL);
503 if (!tmp_ctx) {
507 res = talloc_zero(tmp_ctx, struct ldb_result);
513 dn_filter = talloc_asprintf(tmp_ctx, "(&(%s=%s)(|", SYSDB_NAME, filter);
537 ret = ldb_search(sysdb->ldb, tmp_ctx, &res, NULL,
547 talloc_zfree(tmp_ctx);
557 TALLOC_CTX *tmp_ctx;
567 tmp_ctx = talloc_new(NULL);
568 if (!tmp_ctx) {
572 base_dn = sysdb_user_base_dn(tmp_ctx, domain);
578 ts_filter = enum_filter(tmp_ctx, SYSDB_PWENT_FILTER,
586 ret = sysdb_search_ts_users(tmp_ctx, domain, ts_filter,
593 ret = search_ts_matches(tmp_ctx, domain->sysdb, attrs, &ts_res,
599 filter = enum_filter(tmp_ctx, SYSDB_PWENT_FILTER,
607 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
630 talloc_zfree(tmp_ctx);
647 TALLOC_CTX *tmp_ctx;
652 tmp_ctx = talloc_new(NULL);
653 if (tmp_ctx == NULL) {
658 ret = sysdb_enumpwent_filter(tmp_ctx, domain, name_filter, addtl_filter, &res);
680 talloc_zfree(tmp_ctx);
740 TALLOC_CTX *tmp_ctx;
746 tmp_ctx = talloc_new(NULL);
747 if (!tmp_ctx) {
753 ret = sysdb_search_group_override_by_name(tmp_ctx, domain, name,
765 ret = sysdb_getgrnam(tmp_ctx, domain, name, &orig_obj);
823 talloc_free(tmp_ctx);
832 TALLOC_CTX *tmp_ctx;
841 tmp_ctx = talloc_new(NULL);
842 if (!tmp_ctx) {
848 base_dn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb,
852 base_dn = sysdb_group_base_dn(tmp_ctx, domain);
859 ret = sss_filter_sanitize_for_dom(tmp_ctx, name, domain,
865 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
887 talloc_zfree(tmp_ctx);
896 TALLOC_CTX *tmp_ctx;
902 tmp_ctx = talloc_new(NULL);
903 if (!tmp_ctx) {
909 ret = sysdb_search_group_override_by_gid(tmp_ctx, domain, gid,
921 ret = sysdb_getgrgid(tmp_ctx, domain, gid, &orig_obj);
979 talloc_free(tmp_ctx);
988 TALLOC_CTX *tmp_ctx;
996 tmp_ctx = talloc_new(NULL);
997 if (!tmp_ctx) {
1003 base_dn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb,
1007 base_dn = sysdb_group_base_dn(tmp_ctx, domain);
1014 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
1035 talloc_zfree(tmp_ctx);
1045 TALLOC_CTX *tmp_ctx;
1061 tmp_ctx = talloc_new(NULL);
1062 if (!tmp_ctx) {
1068 base_dn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb,
1072 base_dn = sysdb_group_base_dn(tmp_ctx, domain);
1079 ts_filter = enum_filter(tmp_ctx, base_filter,
1087 ret = sysdb_search_ts_groups(tmp_ctx, domain, ts_filter,
1094 ret = search_ts_matches(tmp_ctx, domain->sysdb, attrs, &ts_res,
1100 filter = enum_filter(tmp_ctx, base_filter,
1108 lret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
1136 talloc_zfree(tmp_ctx);
1153 TALLOC_CTX *tmp_ctx;
1158 tmp_ctx = talloc_new(NULL);
1159 if (tmp_ctx == NULL) {
1164 ret = sysdb_enumgrent_filter(tmp_ctx, domain, name_filter, addtl_filter, &res);
1195 talloc_zfree(tmp_ctx);
1211 TALLOC_CTX *tmp_ctx;
1220 tmp_ctx = talloc_new(NULL);
1221 if (!tmp_ctx) {
1225 ret = sysdb_getpwnam(tmp_ctx, domain, name, &res);
1253 ctrl = talloc_array(tmp_ctx, struct ldb_control *, 2);
1280 ret = ldb_build_search_req(&req, domain->sysdb->ldb, tmp_ctx,
1302 talloc_zfree(tmp_ctx);
1311 TALLOC_CTX *tmp_ctx;
1319 tmp_ctx = talloc_new(NULL);
1320 if (tmp_ctx == NULL) {
1325 ret = sysdb_search_user_by_upn(tmp_ctx, domain, upn, attrs, &msg);
1331 res = talloc_zero(tmp_ctx, struct ldb_result);
1348 ret = sysdb_initgroups(tmp_ctx, domain, sysdb_name, &res);
1366 talloc_free(tmp_ctx);
1375 TALLOC_CTX *tmp_ctx;
1385 tmp_ctx = talloc_new(NULL);
1386 if (!tmp_ctx) {
1390 ret = sysdb_getpwnam_with_views(tmp_ctx, domain, name, &res);
1418 ctrl = talloc_array(tmp_ctx, struct ldb_control *, 2);
1445 ret = ldb_build_search_req(&req, domain->sysdb->ldb, tmp_ctx,
1480 talloc_zfree(tmp_ctx);
1490 TALLOC_CTX *tmp_ctx;
1497 tmp_ctx = talloc_new(NULL);
1498 if (!tmp_ctx) {
1502 base_dn = sysdb_user_base_dn(tmp_ctx, domain);
1508 ret = sss_filter_sanitize_for_dom(tmp_ctx, name, domain,
1514 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
1533 talloc_zfree(tmp_ctx);
1550 TALLOC_CTX *tmp_ctx;
1552 tmp_ctx = talloc_new(NULL);
1553 if (tmp_ctx == NULL) {
1562 ret = add_strings_lists(tmp_ctx, attributes, mandatory_override_attrs,
1569 ret = sysdb_search_user_override_attrs_by_name(tmp_ctx, domain, name,
1581 ret = sysdb_get_user_attr(tmp_ctx, domain, name, attrs, &orig_obj);
1615 talloc_free(tmp_ctx);
1635 TALLOC_CTX *tmp_ctx;
1653 tmp_ctx = talloc_new(NULL);
1654 if (!tmp_ctx) {
1682 host = talloc_strndup(tmp_ctx, p_host, len);
1704 user = talloc_strndup(tmp_ctx, p_user, len);
1725 domain = talloc_strndup(tmp_ctx, p_domain, len);
1760 talloc_free(tmp_ctx);
1772 TALLOC_CTX *tmp_ctx;
1781 tmp_ctx = talloc_new(NULL);
1782 if (!tmp_ctx) {
1797 tmp_entry = talloc_array(tmp_ctx, struct sysdb_netgroup_ctx *, size + 1);
1809 triple_str = talloc_strndup(tmp_ctx,
1873 talloc_free(tmp_ctx);
1882 TALLOC_CTX *tmp_ctx;
1891 tmp_ctx = talloc_new(NULL);
1892 if (!tmp_ctx) {
1896 base_dn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb,
1904 ret = sss_filter_sanitize_for_dom(tmp_ctx, netgroup, domain,
1911 netgroup_dn = talloc_asprintf(tmp_ctx, SYSDB_TMPL_NETGROUP,
1918 SSS_LDB_SEARCH(ret, domain->sysdb->ldb, tmp_ctx, &result, base_dn,
1929 talloc_zfree(tmp_ctx);
1939 TALLOC_CTX *tmp_ctx;
1946 tmp_ctx = talloc_new(NULL);
1947 if (!tmp_ctx) {
1951 base_dn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb,
1958 ret = sss_filter_sanitize_for_dom(tmp_ctx, netgrname, domain,
1965 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &result, base_dn,
1978 talloc_zfree(tmp_ctx);
1998 TALLOC_CTX *tmp_ctx = NULL;
2002 tmp_ctx = talloc_new(NULL);
2003 if (!tmp_ctx) return ENOMEM;
2006 dn = sysdb_user_strdn(tmp_ctx, dom->name, name);
2008 dn = sysdb_group_strdn(tmp_ctx, dom->name, name);
2020 ret = sss_filter_sanitize(tmp_ctx, dn, &sanitized_dn);
2025 member_filter = talloc_asprintf(tmp_ctx, "(&(%s=%s)(%s=%s))",
2034 basedn = sysdb_base_dn(dom->sysdb, tmp_ctx);
2036 basedn = sysdb_group_base_dn(tmp_ctx, parent_dom);
2046 ret = sysdb_search_entry(tmp_ctx, dom->sysdb, basedn,
2059 direct_parents = talloc_array(tmp_ctx, char *, direct_sysdb_count+1);
2089 talloc_free(tmp_ctx);
2099 TALLOC_CTX *tmp_ctx;
2104 tmp_ctx = talloc_new(NULL);
2105 if (!tmp_ctx) {
2109 ret = sysdb_getpwnam(tmp_ctx, domain, name_or_upn_or_sid, &res);
2116 ret = sysdb_search_user_by_upn(tmp_ctx, domain, name_or_upn_or_sid,
2119 ret = sysdb_search_user_by_sid_str(tmp_ctx, domain,
2122 ret = sysdb_search_object_by_uuid(tmp_ctx, domain,
2162 talloc_free(tmp_ctx);
2171 TALLOC_CTX *tmp_ctx;
2177 tmp_ctx = talloc_new(NULL);
2178 if (!tmp_ctx) {
2184 ret = sysdb_search_override_by_cert(tmp_ctx, domain, cert, attrs,
2196 ret = sysdb_search_user_by_cert(tmp_ctx, domain, cert, &orig_obj);
2229 talloc_free(tmp_ctx);