/sssd-io/src/providers/ipa/ |
H A D | ipa_subdomains_utils.c | 35 struct ldb_dn *dn = NULL; local 47 dn = ldb_dn_new(mem_ctx, ldb_ctx, orig_dn); 48 if (dn == NULL) { 53 if (!ldb_dn_validate(dn)) { 56 talloc_free(dn); 60 return dn; 63 bool ipa_subdom_is_member_dom(struct ldb_dn *dn) argument 67 if (dn == NULL) { 72 if (ldb_dn_get_comp_num(dn) < 5) { 85 val = ldb_dn_get_component_val(dn, [all...] |
H A D | ipa_dn.h | 34 #define ipa_get_rdn(mem_ctx, sysdb, dn, _rdn_val, rdn_attr, ...) \ 35 _ipa_get_rdn(mem_ctx, sysdb, dn, _rdn_val, rdn_attr, ##__VA_ARGS__, NULL) 37 #define ipa_check_rdn(sysdb, dn, rdn_attr, ...) \ 38 _ipa_get_rdn(NULL, sysdb, dn, NULL, rdn_attr, ##__VA_ARGS__, NULL) 40 #define ipa_check_rdn_bool(sysdb, dn, rdn_attr, ...) \ 41 ((bool)(ipa_check_rdn(sysdb, dn, rdn_attr, ##__VA_ARGS__) == EOK))
|
H A D | ipa_dn.c | 26 static bool check_dn(struct ldb_dn *dn, argument 40 ldbattr = ldb_dn_get_rdn_name(dn); 50 num_comp = ldb_dn_get_comp_num(dn); 63 ldbattr = ldb_dn_get_component_name(dn, comp); 68 ldbval = ldb_dn_get_component_val(dn, comp); 82 ldbattr = ldb_dn_get_component_name(dn, comp); 102 struct ldb_dn *dn; local 108 dn = ldb_dn_new(mem_ctx, sysdb_ctx_get_ldb(sysdb), obj_dn); 109 if (dn == NULL) { 114 bret = check_dn(dn, rdn_att [all...] |
H A D | ipa_hbac_users.c | 42 struct ldb_dn *dn; local 59 dn = ldb_dn_new(mem_ctx, sysdb_ctx_get_ldb(sysdb), group_dn); 60 if (dn == NULL) { 65 if (!ldb_dn_validate(dn)) { 71 if (ldb_dn_get_comp_num(dn) < 4) { 80 rdn_name = ldb_dn_get_rdn_name(dn); 101 group_comp_name = ldb_dn_get_component_name(dn, 1); 110 group_comp_val = ldb_dn_get_component_val(dn, 1); 123 account_comp_name = ldb_dn_get_component_name(dn, 2); 132 account_comp_val = ldb_dn_get_component_val(dn, [all...] |
H A D | ipa_rules_common.c | 355 struct ldb_dn *dn; local 370 dn = ldb_dn_new(mem_ctx, sysdb_ctx_get_ldb(sysdb), host_dn); 371 if (dn == NULL) { 376 if (!ldb_dn_validate(dn)) { 381 if (ldb_dn_get_comp_num(dn) < 4) { 389 rdn_name = ldb_dn_get_rdn_name(dn); 407 hostgroup_comp_name = ldb_dn_get_component_name(dn, 1); 414 hostgroup_comp_val = ldb_dn_get_component_val(dn, 1); 424 account_comp_name = ldb_dn_get_component_name(dn, 2); 431 account_comp_val = ldb_dn_get_component_val(dn, [all...] |
/sssd-io/src/db/ |
H A D | sysdb_domain_resolution_order.h | 29 struct ldb_dn *dn, 34 struct ldb_dn *dn,
|
H A D | sysdb_domain_resolution_order.c | 29 struct ldb_dn *dn, 43 ret = ldb_search(sysdb->ldb, tmp_ctx, &res, dn, LDB_SCOPE_BASE, attrs, 79 struct ldb_dn *dn, 93 tmp_ctx, sysdb, dn, attrs, &domain_resolution_order); 118 struct ldb_dn *dn, 136 msg->dn = dn; 27 sysdb_get_domain_resolution_order_string_attr(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb, struct ldb_dn *dn, const char *const *attrs, const char **_attr) argument 77 sysdb_get_domain_resolution_order(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb, struct ldb_dn *dn, const char **_domain_resolution_order) argument 117 sysdb_update_domain_resolution_order(struct sysdb_ctx *sysdb, struct ldb_dn *dn, const char *domain_resolution_order) argument
|
H A D | sysdb_services.c | 31 struct ldb_dn *dn, 38 struct ldb_dn *dn, 217 res->msgs[i]->dn)); 219 ret = sysdb_delete_entry(sysdb, res->msgs[i]->dn, true); 224 res->msgs[i]->dn)); 251 res->msgs[0]->dn)); 253 ret = sysdb_delete_entry(sysdb, res->msgs[0]->dn, true); 258 res->msgs[0]->dn)); 289 res->msgs[i]->dn)); 291 ret = sysdb_delete_entry(sysdb, res->msgs[i]->dn, tru 417 struct ldb_dn *dn; local 432 sysdb_svc_add(TALLOC_CTX *mem_ctx, struct sss_domain_info *domain, const char *primary_name, int port, const char **aliases, const char **protocols, struct ldb_dn **dn) argument 528 sysdb_svc_update(struct sysdb_ctx *sysdb, struct ldb_dn *dn, int port, const char **aliases, const char **protocols) argument 605 sysdb_svc_remove_alias(struct sysdb_ctx *sysdb, struct ldb_dn *dn, const char *alias) argument 762 struct ldb_dn *dn; local [all...] |
H A D | sysdb_selinux.c | 34 struct ldb_dn *dn, 68 msg->dn = dn; 92 struct ldb_dn *dn = NULL; local 116 dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb, SYSDB_TMPL_SEUSERMAP, 121 dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb, SYSDB_TMPL_SELINUX_BASE, 132 if (!dn) { 149 ret = sysdb_add_selinux_entity(sysdb, dn, objectclass, attrs, now); 154 ret = sysdb_set_entry_attr(sysdb, dn, attrs, SYSDB_MOD_REP); 226 struct ldb_dn *dn local 33 sysdb_add_selinux_entity(struct sysdb_ctx *sysdb, struct ldb_dn *dn, const char *objectclass, struct sysdb_attrs *attrs, time_t now) argument [all...] |
H A D | sysdb_autofs.c | 49 struct ldb_dn *dn = NULL; local 71 dn = ldb_dn_new_fmt(mem_ctx, domain->sysdb->ldb, SYSDB_TMPL_AUTOFS_ENTRY, 76 return dn; 86 struct ldb_dn *dn; local 89 dn = sysdb_autofsentry_dn(mem_ctx, domain, 91 if (!dn) return NULL; 93 strdn = talloc_strdup(mem_ctx, ldb_dn_get_linearized(dn)); 94 talloc_free(dn); 256 struct ldb_dn *dn; local 310 dn 337 struct ldb_dn *dn; local 416 struct ldb_dn *dn; local [all...] |
H A D | sysdb_idmap.c | 33 struct ldb_dn *dn; local 42 dn = ldb_dn_new_fmt(mem_ctx, domain->sysdb->ldb, SYSDB_TMPL_IDMAP, 46 return dn; 59 struct ldb_dn *dn; local 70 dn = sysdb_idmap_dn(tmp_ctx, domain, dom_sid); 71 if (!dn) { 81 update_msg->dn = dn; 93 ret = sysdb_search_entry(tmp_ctx, domain->sysdb, dn, LDB_SCOPE_BASE,
|
H A D | sysdb_upgrade.c | 77 msg->dn = ldb_dn_new(msg, ctx->ldb, SYSDB_BASE); 78 if (!msg->dn) { 191 ldb_dn_get_linearized(res->msgs[i]->dn)); 201 msg->dn = res->msgs[i]->dn; 216 val = ldb_dn_get_component_val(res->msgs[i]->dn, 2); 476 if ((ldb_dn_compare(msg->dn, domain_dn) == 0) || 477 (ldb_dn_compare(msg->dn, users_dn) == 0) || 478 (ldb_dn_compare(msg->dn, groups_dn) == 0)) { 485 orig_dn = msg->dn; 1655 object_domain_from_dn(TALLOC_CTX *mem_ctx, struct ldb_dn *dn, unsigned domain_index) argument [all...] |
H A D | sysdb.c | 63 struct ldb_dn *dn = NULL; local 75 dn = ldb_dn_new_fmt(tmp_ctx, dom->sysdb->ldb, SYSDB_TMPL_CUSTOM_SUBTREE, 77 if (dn) { 78 talloc_steal(mem_ctx, dn); 82 return dn; 94 struct ldb_dn *dn = NULL; local 111 dn = ldb_dn_new_fmt(mem_ctx, dom->sysdb->ldb, SYSDB_TMPL_CUSTOM, clean_name, 116 return dn; 124 struct ldb_dn *dn; local 131 dn 150 struct ldb_dn *dn; local 177 struct ldb_dn *dn; local 198 sysdb_get_rdn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx, const char *dn, char **_name, char **_val) argument 256 sysdb_group_dn_name(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx, const char *dn, char **_name) argument 1069 sysdb_get_bool(struct sysdb_ctx *sysdb, struct ldb_dn *dn, const char *attr_name, bool *value) argument 1126 sysdb_set_bool(struct sysdb_ctx *sysdb, struct ldb_dn *dn, const char *cn_value, const char *attr_name, bool value) argument 1208 struct ldb_dn *dn; local 1237 struct ldb_dn *dn; local 1774 is_ts_ldb_dn(struct ldb_dn *dn) argument [all...] |
/sssd-io/src/tests/cmocka/ |
H A D | test_ipa_subdomains_utils.c | 71 static struct sysdb_attrs *dn_attrs(TALLOC_CTX *mem_ctx, const char *dn) argument 79 rv = sysdb_attrs_add_string(attrs, SYSDB_ORIG_DN, dn); 87 struct ldb_dn *dn; local 97 dn = ipa_subdom_ldb_dn(test_ctx, test_ctx->ldb, attrs); 98 assert_non_null(dn); 99 assert_string_equal(ldb_dn_get_linearized(dn), "dc=foo,dc=bar"); 101 talloc_free(dn); 107 struct ldb_dn *dn; local 117 dn = ipa_subdom_ldb_dn(test_ctx, NULL, NULL); 118 assert_null(dn); 135 struct ldb_dn *dn; local 150 struct ldb_dn *dn; local [all...] |
H A D | test_search_bases.c | 41 DN_NOT_IN_DOMS, /* dn is not in any domain */ 42 DN_IN_DOM1, /* dn is in the domain based on dns */ 43 DN_IN_DOM2, /* dn is in the domain based on dns2 */ 68 static bool do_test_search_bases(const char* dn, const char** dns, size_t n) argument 79 ret = sss_ldap_dn_in_search_bases(tmp_ctx, dn, search_bases, NULL); 88 const char *dn = "cn=user, dc=sub, dc=ad, dc=pb"; local 92 ret = do_test_search_bases(dn, dns, 2); 98 const char *dn = "cn=user, dc=sub, dc=ad, dc=pb"; local 102 ret = do_test_search_bases(dn, dns, 3); 106 static void do_test_get_by_dn(const char *dn, cons argument 155 const char *dn = "cn=user, dc=sub, dc=ad, dc=pb"; local 164 const char *dn = "cn=user, dc=ad, dc=com"; local 173 const char *dn = "cn=user, dc=sub, dc=example, dc=com"; local [all...] |
H A D | test_sysdb_domain_resolution_order.c | 86 struct ldb_dn *dn; local 88 dn = sysdb_domain_dn(test_ctx, test_ctx->tctx->dom); 89 assert_non_null(dn); 94 dn, domains_in); 98 test_ctx->tctx->dom->sysdb, dn, 110 dn, domains_in); 114 test_ctx->tctx->dom->sysdb, dn, 122 dn, domains_in); 126 test_ctx->tctx->dom->sysdb, dn, 134 dn, domains_i [all...] |
/sssd-io/src/responder/ifp/ |
H A D | ifp_cache.h | 53 struct ldb_dn *dn); 57 struct ldb_dn *dn);
|
/sssd-io/src/providers/ldap/ |
H A D | sdap_domain.c | 49 const char *dn) 63 if (sss_ldap_dn_in_search_bases_len(tmp_ctx, dn, sditer->search_bases, 65 || sss_ldap_dn_in_search_bases_len(tmp_ctx, dn, 67 || sss_ldap_dn_in_search_bases_len(tmp_ctx, dn, 69 || sss_ldap_dn_in_search_bases_len(tmp_ctx, dn, 71 || sss_ldap_dn_in_search_bases_len(tmp_ctx, dn, 73 || sss_ldap_dn_in_search_bases_len(tmp_ctx, dn, 75 || sss_ldap_dn_in_search_bases_len(tmp_ctx, dn, 48 sdap_domain_get_by_dn(struct sdap_options *opts, const char *dn) argument
|
H A D | sdap_async_netgroups.c | 33 LDAPDN dn; local 35 ret = ldap_str2dn(str, &dn, LDAP_DN_FORMAT_LDAPV3); 36 ldap_dnfree(dn); 177 const char *dn; local 189 dn = ldb_msg_find_attr_as_string(res[c], SYSDB_ORIG_DN, NULL); 190 if (dn == NULL) { 194 if (strcmp(dn, dn_item->dn) == 0) { 196 "Found matching entry for [%s].\n", dn_item->dn); 292 dn_item->dn [all...] |
/sssd-io/src/responder/secrets/ |
H A D | local.c | 131 struct ldb_dn *dn; local 135 dn = ldb_dn_new(mem_ctx, ldb, basedn); 136 if (!dn) { 150 if (!ldb_dn_add_child_fmt(dn, "cn=%.*s", (int)(e - s), s)) { 156 if (!ldb_dn_add_child_fmt(dn, "cn=%s", s)) { 166 req_path, ldb_dn_get_linearized(dn)); 167 *req_dn = dn; 176 struct ldb_dn *dn) 183 dncomps = ldb_dn_get_comp_num(dn); 188 val = ldb_dn_get_component_val(dn, 174 local_dn_to_path(TALLOC_CTX *mem_ctx, struct ldb_dn *basedn, struct ldb_dn *dn) argument 351 struct ldb_dn *dn; local 509 struct ldb_dn *dn; local [all...] |
/sssd-io/src/util/ |
H A D | sss_ldap.h | 87 const char *dn, 92 const char *dn,
|
H A D | sss_ldap.c | 322 const char *dn, 338 if (dn == NULL) { 339 DEBUG(SSSDBG_FUNC_DATA, "dn is NULL\n"); 350 dn_len = strlen(dn); 360 base_confirmed = (strncasecmp(&dn[len_diff], base->basedn, basedn_len) == 0); 368 /* dn > base? */ 382 if (dn[j] == '\\') { 384 } else if (dn[j] == ',' && !backslash_found) { 399 /* dn length >= base dn lengt 321 sss_ldap_dn_in_search_bases_len(TALLOC_CTX *mem_ctx, const char *dn, struct sdap_search_base **search_bases, char **_filter, int *_match_len) argument 447 sss_ldap_dn_in_search_bases(TALLOC_CTX *mem_ctx, const char *dn, struct sdap_search_base **search_bases, char **_filter) argument [all...] |
/sssd-io/src/tools/ |
H A D | sss_groupshow.c | 52 struct ldb_dn *dn) 56 val = ldb_dn_get_rdn_val(dn); 69 struct ldb_dn *dn = NULL; local 77 dn = ldb_dn_from_ldb_val(gi, ldb, &(el->values[i])); 78 gi->memberofs[i] = talloc_strdup(gi, rdn_as_string(gi, dn)); 79 talloc_zfree(dn); 101 struct ldb_dn *dn = NULL; local 129 dn = ldb_dn_from_ldb_val(tmp_ctx, ldb, &(el->values[i])); 132 parent_dn = ldb_dn_get_parent(tmp_ctx, dn); 134 um[um_index] = rdn_as_string(mem_ctx, dn); 51 rdn_as_string(TALLOC_CTX *mem_ctx, struct ldb_dn *dn) argument 424 struct ldb_dn *dn; local [all...] |
/sssd-io/src/tools/sssctl/ |
H A D | sssctl_access_report.c | 40 struct ldb_dn *dn = NULL; local 49 dn = ldb_dn_new(tmp_ctx, sysdb_ctx_get_ldb(dom->sysdb), dn_attr); 50 if (dn == NULL) { 55 rdn_val = ldb_dn_get_rdn_val(dn); 87 struct ldb_dn *dn = NULL; local 94 dn = ldb_dn_new(tmp_ctx, sysdb_ctx_get_ldb(dom->sysdb), dn_attr); 95 if (dn == NULL) { 100 comp_name = ldb_dn_get_component_name(dn, 1); 101 comp_val = ldb_dn_get_component_val(dn, 1);
|
/sssd-io/src/confdb/ |
H A D | confdb.c | 65 char *dn = NULL; local 80 dn = talloc_asprintf(tmp_ctx, "cn=%s", s); 82 dn[l] = '\0'; 84 dn = prepend_cn(dn, &l, s, p-s); 86 if (!dn) { 101 *sec_dn = talloc_steal(mem_ctx, dn); 118 struct ldb_dn *dn; local 134 dn = ldb_dn_new(tmp_ctx, cdb->ldb, secdn); 135 CONFDB_ZERO_CHECK_OR_JUMP(dn, re 231 struct ldb_dn *dn; local 306 struct ldb_dn *dn; local 825 struct ldb_dn *dn; local 1570 struct ldb_dn *dn = NULL; local 1799 struct ldb_dn *dn = NULL; local [all...] |