• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/samba-3.0.25b/source/passdb/

Lines Matching defs:mem_ctx

116 const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver )
120 return get_attr_list( mem_ctx, attrib_map_v22 );
123 return get_attr_list( mem_ctx, attrib_map_v30 );
136 static const char** get_userattr_delete_list( TALLOC_CTX *mem_ctx,
141 return get_attr_list( mem_ctx,
145 return get_attr_list( mem_ctx,
190 TALLOC_CTX *mem_ctx;
221 mem_ctx = talloc_init("ldapsam_get_seq_num");
223 if (mem_ctx == NULL)
226 if ((attrs = TALLOC_ARRAY(mem_ctx, const char *, 2)) == NULL) {
237 attrs[0] = talloc_strdup(mem_ctx, "syncreplCookie");
245 attrs[0] = talloc_strdup(mem_ctx, "contextCSN");
310 if (mem_ctx)
311 talloc_destroy(mem_ctx);
398 TALLOC_CTX *mem_ctx,
408 dn = smbldap_talloc_dn(mem_ctx, priv2ld(priv), entry);
443 talloc_autofree_ldapmod(mem_ctx, mods);
1352 static void append_attr(TALLOC_CTX *mem_ctx, const char ***attr_list,
1365 (*attr_list) = TALLOC_REALLOC_ARRAY(mem_ctx, (*attr_list),
1684 TALLOC_CTX *mem_ctx;
1696 mem_ctx = talloc_new(NULL);
1697 if (mem_ctx == NULL) {
1702 attr_list = get_userattr_delete_list(mem_ctx, priv->schema_ver );
1718 priv, mem_ctx, entry,
1727 TALLOC_FREE(mem_ctx);
2354 TALLOC_CTX *mem_ctx,
2376 filter = talloc_asprintf(mem_ctx,
2395 talloc_autofree_ldapmsg(mem_ctx, result);
2415 gidstr = smbldap_talloc_single_attribute(priv2ld(ldap_state), entry, "gidNumber", mem_ctx);
2426 filter = talloc_asprintf(mem_ctx, "(&(objectClass=%s)(|", LDAP_OBJ_SAMBASAMACCOUNT);
2467 talloc_autofree_ldapmsg(mem_ctx, result);
2479 mem_ctx);
2499 if (!add_rid_to_array_unique(mem_ctx, rid, pp_member_rids,
2507 filter = talloc_asprintf(mem_ctx,
2520 talloc_autofree_ldapmsg(mem_ctx, result);
2538 if (!add_rid_to_array_unique(mem_ctx, rid, pp_member_rids,
2556 TALLOC_CTX *mem_ctx,
2588 filter = talloc_asprintf(mem_ctx,
2603 talloc_autofree_ldapmsg(mem_ctx, result);
2615 gidstr = smbldap_talloc_single_attribute(priv2ld(ldap_state), entry, "gidNumber", mem_ctx);
2629 filter = talloc_asprintf(mem_ctx,
2643 talloc_autofree_ldapmsg(mem_ctx, result);
2653 if (!add_gid_to_array_unique(mem_ctx, primary_gid, pp_gids, &num_gids)) {
2660 if (!add_sid_to_array_unique(mem_ctx, &global_sid_NULL, pp_sids, &num_sids)) {
2695 if (!add_gid_to_array_unique(mem_ctx, gid, pp_gids,
2700 if (!add_sid_to_array_unique(mem_ctx, &sid, pp_sids,
2728 static NTSTATUS ldapsam_map_posixgroup(TALLOC_CTX *mem_ctx,
2737 filter = talloc_asprintf(mem_ctx,
2745 get_attr_list(mem_ctx, groupmap_attr_list),
2747 talloc_autofree_ldapmsg(mem_ctx, msg);
2755 dn = smbldap_talloc_dn(mem_ctx, ldap_state->smbldap_state->ldap_struct, entry);
2766 talloc_asprintf(mem_ctx, "%d", map->sid_name_use));
2771 talloc_autofree_ldapmod(mem_ctx, mods);
2792 TALLOC_CTX *mem_ctx;
2799 mem_ctx = talloc_new(NULL);
2800 if (mem_ctx == NULL) {
2805 filter = talloc_asprintf(mem_ctx, "(sambaSid=%s)",
2814 talloc_autofree_ldapmsg(mem_ctx, msg);
2831 result = ldapsam_map_posixgroup(mem_ctx, ldap_state, map);
2872 dn = talloc_asprintf(mem_ctx, "sambaSid=%s,%s",
2890 talloc_asprintf(mem_ctx, "%d", map->sid_name_use));
2896 talloc_asprintf(mem_ctx, "%u", map->gid));
2897 talloc_autofree_ldapmod(mem_ctx, mods);
2905 TALLOC_FREE(mem_ctx);
2925 TALLOC_CTX *mem_ctx;
2928 mem_ctx = talloc_new(NULL);
2929 if (mem_ctx == NULL) {
2937 filter = talloc_asprintf(mem_ctx, "(&(objectClass=%s)"
2949 get_attr_list(mem_ctx, groupmap_attr_list),
2951 talloc_autofree_ldapmsg(mem_ctx, msg);
2960 dn = smbldap_talloc_dn(mem_ctx, ldap_state->smbldap_state->ldap_struct, entry);
2972 talloc_autofree_ldapmod(mem_ctx, mods);
2994 TALLOC_FREE(mem_ctx);
3009 TALLOC_CTX *mem_ctx;
3012 mem_ctx = talloc_new(NULL);
3013 if (mem_ctx == NULL) {
3018 filter = talloc_asprintf(mem_ctx, "(&(objectClass=%s)(%s=%s))",
3026 get_attr_list(mem_ctx, groupmap_attr_list),
3028 talloc_autofree_ldapmsg(mem_ctx, msg);
3037 rc = ldapsam_delete_entry(priv, mem_ctx, entry, LDAP_OBJ_GROUPMAP,
3038 get_attr_list(mem_ctx,
3051 rc = ldapsam_delete_entry(priv, mem_ctx, entry,
3066 rc = ldapsam_delete_entry(priv, mem_ctx, entry,
3073 TALLOC_FREE(mem_ctx);
3416 TALLOC_CTX *mem_ctx,
3450 filter = talloc_asprintf(mem_ctx,
3455 filter = talloc_asprintf(mem_ctx, "%s(sambaSIDList=%s)",
3459 filter = talloc_asprintf(mem_ctx, "%s))", filter);
3493 if (!add_rid_to_array_unique(mem_ctx, rid, pp_alias_rids,
3703 TALLOC_CTX *mem_ctx;
3707 mem_ctx = talloc_new(NULL);
3708 if (mem_ctx == NULL) {
3722 allsids = talloc_strdup(mem_ctx, "");
3744 mem_ctx, ("(&(objectClass=%s)(|%s))"),
3755 talloc_autofree_ldapmsg(mem_ctx, msg);
3813 mem_ctx, "(&(objectClass=%s)(|%s))",
3823 talloc_autofree_ldapmsg(mem_ctx, msg);
3845 const char *dn = smbldap_talloc_dn(mem_ctx, ld, entry);
3848 mem_ctx);
3905 TALLOC_FREE(mem_ctx);
3909 static char *get_ldap_filter(TALLOC_CTX *mem_ctx, const char *username)
3922 result = talloc_string_sub(mem_ctx, filter, "%u", username);
3931 const char **talloc_attrs(TALLOC_CTX *mem_ctx, ...)
3937 va_start(ap, mem_ctx);
3942 if ((result = TALLOC_ARRAY(mem_ctx, const char *, num+1)) == NULL) {
3946 va_start(ap, mem_ctx);
3975 TALLOC_CTX *mem_ctx,
4078 result = state->ldap2displayentry(state, search->mem_ctx, state->connection->ldap_struct,
4132 TALLOC_CTX *mem_ctx,
4162 pull_utf8_talloc(mem_ctx,
4171 pull_utf8_talloc(mem_ctx,
4180 pull_utf8_talloc(mem_ctx,
4223 state = TALLOC_P(search->mem_ctx, struct ldap_search_state);
4240 state->base = talloc_strdup(search->mem_ctx, state->base);
4242 state->filter = get_ldap_filter(search->mem_ctx, "*");
4243 state->attrs = talloc_attrs(search->mem_ctx, "uid", "sambaSid",
4264 TALLOC_CTX *mem_ctx,
4308 pull_utf8_talloc(mem_ctx,
4313 pull_utf8_talloc(mem_ctx,
4324 pull_utf8_talloc(mem_ctx,
4382 state = TALLOC_P(search->mem_ctx, struct ldap_search_state);
4390 state->base = talloc_strdup(search->mem_ctx, lp_ldap_group_suffix());
4393 state->filter = talloc_asprintf(search->mem_ctx,
4397 state->attrs = talloc_attrs(search->mem_ctx, "cn", "sambaSid",
4450 TALLOC_CTX *mem_ctx;
4452 mem_ctx = talloc_new(NULL);
4453 if (mem_ctx == NULL) {
4466 talloc_autofree_ldapmsg(mem_ctx, result);
4482 "sambaNextRid", mem_ctx);
4489 "sambaNextUserRid", mem_ctx);
4496 "sambaNextGroupRid", mem_ctx);
4509 talloc_asprintf(mem_ctx, "%d", nextRid));
4510 talloc_autofree_ldapmod(mem_ctx, mods);
4512 if ((dn = smbldap_talloc_dn(mem_ctx, priv2ld(priv), entry)) == NULL) {
4529 TALLOC_FREE(mem_ctx);
4576 TALLOC_CTX *mem_ctx;
4578 mem_ctx = talloc_new(NULL);
4579 if (mem_ctx == NULL) {
4584 filter = talloc_asprintf(mem_ctx,
4599 talloc_autofree_ldapmsg(mem_ctx, result);
4610 "sambaGroupType", mem_ctx);
4617 priv2ld(priv), entry, "gidNumber", mem_ctx);
4620 smbldap_talloc_dn(mem_ctx, priv2ld(priv),
4634 "uidNumber", mem_ctx);
4637 smbldap_talloc_dn(mem_ctx, priv2ld(priv), entry)));
4646 TALLOC_FREE(mem_ctx);
5377 TALLOC_CTX *mem_ctx,
5398 gidstr = talloc_asprintf(mem_ctx, "%d", gid);
5409 filter = talloc_asprintf(mem_ctx,
5428 talloc_autofree_ldapmsg(mem_ctx, result);
5448 dn = smbldap_talloc_dn(mem_ctx, priv2ld(ldap_state), entry);