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,
133 talloc_zfree(tmp_ctx);
188 TALLOC_CTX *tmp_ctx;
196 tmp_ctx = talloc_new(NULL);
197 if (!tmp_ctx) {
201 base_dn = sysdb_user_base_dn(tmp_ctx, domain);
207 ret = sss_filter_sanitize_for_dom(tmp_ctx, name, domain,
213 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
248 talloc_zfree(tmp_ctx);
260 TALLOC_CTX *tmp_ctx;
262 tmp_ctx = talloc_new(NULL);
263 if (tmp_ctx == NULL) {
270 ret = sysdb_search_user_override_by_name(tmp_ctx, domain, name,
282 ret = sysdb_getpwnam(tmp_ctx, domain, name, &orig_obj);
316 talloc_free(tmp_ctx);
325 TALLOC_CTX *tmp_ctx;
332 tmp_ctx = talloc_new(NULL);
333 if (!tmp_ctx) {
337 base_dn = sysdb_user_base_dn(tmp_ctx, domain);
343 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
361 talloc_zfree(tmp_ctx);
373 TALLOC_CTX *tmp_ctx;
375 tmp_ctx = talloc_new(NULL);
376 if (tmp_ctx == NULL) {
383 ret = sysdb_search_user_override_by_uid(tmp_ctx, domain, uid,
395 ret = sysdb_getpwuid(tmp_ctx, domain, uid, &orig_obj);
429 talloc_free(tmp_ctx);
439 TALLOC_CTX *tmp_ctx = NULL;
441 tmp_ctx = talloc_new(NULL);
442 if (tmp_ctx == NULL) {
447 filter = talloc_strdup(tmp_ctx, base_filter);
449 filter = talloc_asprintf(tmp_ctx, "(&%s", base_filter);
469 talloc_free(tmp_ctx);
479 TALLOC_CTX *tmp_ctx;
484 tmp_ctx = talloc_new(NULL);
485 if (tmp_ctx == NULL) {
490 ret = sysdb_search_user_by_upn_res(tmp_ctx, domain, domain_scope, upn, attrs, &res);
499 talloc_free(tmp_ctx);
510 TALLOC_CTX *tmp_ctx = NULL;
520 tmp_ctx = talloc_new(NULL);
521 if (tmp_ctx == NULL) {
525 res = talloc_zero(tmp_ctx, struct ldb_result);
531 ret = ldb_search(sysdb->ldb, tmp_ctx, &res, NULL,
542 talloc_zfree(tmp_ctx);
551 TALLOC_CTX *tmp_ctx = NULL;
561 tmp_ctx = talloc_new(NULL);
562 if (tmp_ctx == NULL) {
566 dn_filter = talloc_asprintf(tmp_ctx, "(&(%s=%s)(|", SYSDB_NAME,
595 talloc_zfree(tmp_ctx);
605 TALLOC_CTX *tmp_ctx;
616 tmp_ctx = talloc_new(NULL);
617 if (!tmp_ctx) {
621 base_dn = sysdb_user_base_dn(tmp_ctx, domain);
627 ts_filter = enum_filter(tmp_ctx, SYSDB_PWENT_FILTER,
635 ret = sysdb_search_ts_users(tmp_ctx, domain, ts_filter,
646 ret = sysdb_enum_dn_filter(tmp_ctx, &ts_res, name_filter, &dn_filter);
651 ret = sysdb_search_ts_matches(tmp_ctx, domain->sysdb, attrs, &ts_res,
657 filter = enum_filter(tmp_ctx, SYSDB_PWENT_FILTER,
665 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
689 talloc_zfree(tmp_ctx);
706 TALLOC_CTX *tmp_ctx;
711 tmp_ctx = talloc_new(NULL);
712 if (tmp_ctx == NULL) {
717 ret = sysdb_enumpwent_filter(tmp_ctx, domain, name_filter, addtl_filter, &res);
739 talloc_zfree(tmp_ctx);
799 TALLOC_CTX *tmp_ctx;
805 tmp_ctx = talloc_new(NULL);
806 if (!tmp_ctx) {
812 ret = sysdb_search_group_override_by_name(tmp_ctx, domain, name,
824 ret = sysdb_getgrnam(tmp_ctx, domain, name, &orig_obj);
882 talloc_free(tmp_ctx);
891 TALLOC_CTX *tmp_ctx;
900 tmp_ctx = talloc_new(NULL);
901 if (!tmp_ctx) {
907 base_dn = sysdb_domain_dn(tmp_ctx, domain);
910 base_dn = sysdb_group_base_dn(tmp_ctx, domain);
917 ret = sss_filter_sanitize_for_dom(tmp_ctx, name, domain,
923 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
945 talloc_zfree(tmp_ctx);
954 TALLOC_CTX *tmp_ctx;
960 tmp_ctx = talloc_new(NULL);
961 if (!tmp_ctx) {
967 ret = sysdb_search_group_override_by_gid(tmp_ctx, domain, gid,
979 ret = sysdb_getgrgid(tmp_ctx, domain, gid, &orig_obj);
1037 talloc_free(tmp_ctx);
1046 TALLOC_CTX *tmp_ctx;
1054 tmp_ctx = talloc_new(NULL);
1055 if (!tmp_ctx) {
1061 base_dn = sysdb_domain_dn(tmp_ctx, domain);
1064 base_dn = sysdb_group_base_dn(tmp_ctx, domain);
1071 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
1092 talloc_zfree(tmp_ctx);
1102 TALLOC_CTX *tmp_ctx;
1119 tmp_ctx = talloc_new(NULL);
1120 if (!tmp_ctx) {
1126 base_dn = sysdb_domain_dn(tmp_ctx, domain);
1129 base_dn = sysdb_group_base_dn(tmp_ctx, domain);
1136 ts_filter = enum_filter(tmp_ctx, base_filter,
1144 ret = sysdb_search_ts_groups(tmp_ctx, domain, ts_filter,
1155 ret = sysdb_enum_dn_filter(tmp_ctx, &ts_res, name_filter, &dn_filter);
1160 ret = sysdb_search_ts_matches(tmp_ctx, domain->sysdb, attrs, &ts_res,
1166 filter = enum_filter(tmp_ctx, base_filter,
1174 lret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
1203 talloc_zfree(tmp_ctx);
1220 TALLOC_CTX *tmp_ctx;
1225 tmp_ctx = talloc_new(NULL);
1226 if (tmp_ctx == NULL) {
1231 ret = sysdb_enumgrent_filter(tmp_ctx, domain, name_filter, addtl_filter, &res);
1262 talloc_zfree(tmp_ctx);
1278 TALLOC_CTX *tmp_ctx;
1287 tmp_ctx = talloc_new(NULL);
1288 if (!tmp_ctx) {
1292 ret = sysdb_getpwnam(tmp_ctx, domain, name, &res);
1320 ctrl = talloc_array(tmp_ctx, struct ldb_control *, 2);
1347 ret = ldb_build_search_req(&req, domain->sysdb->ldb, tmp_ctx,
1369 talloc_zfree(tmp_ctx);
1378 TALLOC_CTX *tmp_ctx;
1386 tmp_ctx = talloc_new(NULL);
1387 if (tmp_ctx == NULL) {
1392 ret = sysdb_search_user_by_upn(tmp_ctx, domain, false, upn, attrs, &msg);
1398 res = talloc_zero(tmp_ctx, struct ldb_result);
1415 ret = sysdb_initgroups(tmp_ctx, domain, sysdb_name, &res);
1433 talloc_free(tmp_ctx);
1442 TALLOC_CTX *tmp_ctx;
1452 tmp_ctx = talloc_new(NULL);
1453 if (!tmp_ctx) {
1457 ret = sysdb_getpwnam_with_views(tmp_ctx, domain, name, &res);
1485 ctrl = talloc_array(tmp_ctx, struct ldb_control *, 2);
1512 ret = ldb_build_search_req(&req, domain->sysdb->ldb, tmp_ctx,
1547 talloc_zfree(tmp_ctx);
1557 TALLOC_CTX *tmp_ctx;
1564 tmp_ctx = talloc_new(NULL);
1565 if (!tmp_ctx) {
1569 base_dn = sysdb_user_base_dn(tmp_ctx, domain);
1575 ret = sss_filter_sanitize_for_dom(tmp_ctx, name, domain,
1581 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &res, base_dn,
1601 talloc_zfree(tmp_ctx);
1618 TALLOC_CTX *tmp_ctx;
1620 tmp_ctx = talloc_new(NULL);
1621 if (tmp_ctx == NULL) {
1630 ret = add_strings_lists(tmp_ctx, attributes, mandatory_override_attrs,
1637 ret = sysdb_search_user_override_attrs_by_name(tmp_ctx, domain, name,
1649 ret = sysdb_get_user_attr(tmp_ctx, domain, name, attrs, &orig_obj);
1683 talloc_free(tmp_ctx);
1703 TALLOC_CTX *tmp_ctx;
1721 tmp_ctx = talloc_new(NULL);
1722 if (!tmp_ctx) {
1750 host = talloc_strndup(tmp_ctx, p_host, len);
1772 user = talloc_strndup(tmp_ctx, p_user, len);
1793 domain = talloc_strndup(tmp_ctx, p_domain, len);
1828 talloc_free(tmp_ctx);
1841 TALLOC_CTX *tmp_ctx;
1850 tmp_ctx = talloc_new(NULL);
1851 if (!tmp_ctx) {
1866 tmp_entry = talloc_array(tmp_ctx, struct sysdb_netgroup_ctx *, size + 1);
1878 triple_str = talloc_strndup(tmp_ctx,
1944 talloc_free(tmp_ctx);
1953 TALLOC_CTX *tmp_ctx;
1962 tmp_ctx = talloc_new(NULL);
1963 if (!tmp_ctx) {
1967 base_dn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb,
1975 ret = sss_filter_sanitize_for_dom(tmp_ctx, netgroup, domain,
1982 netgroup_dn = talloc_asprintf(tmp_ctx, SYSDB_TMPL_NETGROUP,
1989 SSS_LDB_SEARCH(ret, domain->sysdb->ldb, tmp_ctx, &result, base_dn,
2000 talloc_zfree(tmp_ctx);
2010 TALLOC_CTX *tmp_ctx;
2017 tmp_ctx = talloc_new(NULL);
2018 if (!tmp_ctx) {
2022 base_dn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb,
2029 ret = sss_filter_sanitize_for_dom(tmp_ctx, netgrname, domain,
2036 ret = ldb_search(domain->sysdb->ldb, tmp_ctx, &result, base_dn,
2049 talloc_zfree(tmp_ctx);
2069 TALLOC_CTX *tmp_ctx = NULL;
2073 tmp_ctx = talloc_new(NULL);
2074 if (!tmp_ctx) return ENOMEM;
2077 dn = sysdb_user_strdn(tmp_ctx, dom->name, name);
2079 dn = sysdb_group_strdn(tmp_ctx, dom->name, name);
2091 ret = sss_filter_sanitize(tmp_ctx, dn, &sanitized_dn);
2096 member_filter = talloc_asprintf(tmp_ctx, "(&(%s=%s)(%s=%s))",
2105 basedn = sysdb_base_dn(dom->sysdb, tmp_ctx);
2107 basedn = sysdb_group_base_dn(tmp_ctx, parent_dom);
2117 ret = sysdb_search_entry(tmp_ctx, dom->sysdb, basedn,
2130 direct_parents = talloc_array(tmp_ctx, char *, direct_sysdb_count+1);
2160 talloc_free(tmp_ctx);
2170 TALLOC_CTX *tmp_ctx;
2175 tmp_ctx = talloc_new(NULL);
2176 if (!tmp_ctx) {
2180 ret = sysdb_getpwnam(tmp_ctx, domain, name_or_upn_or_sid, &res);
2187 ret = sysdb_search_user_by_upn(tmp_ctx, domain, false, name_or_upn_or_sid,
2190 ret = sysdb_search_user_by_sid_str(tmp_ctx, domain,
2193 ret = sysdb_search_object_by_uuid(tmp_ctx, domain,
2233 talloc_free(tmp_ctx);
2242 TALLOC_CTX *tmp_ctx;
2248 tmp_ctx = talloc_new(NULL);
2249 if (!tmp_ctx) {
2255 ret = sysdb_search_override_by_cert(tmp_ctx, domain, cert, attrs,
2267 ret = sysdb_search_user_by_cert(tmp_ctx, domain, cert, &orig_obj);
2300 talloc_free(tmp_ctx);