summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-12-18 18:06:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:53 -0500
commit28fb5b6f97c17af58ae99be98219de70ee95baba (patch)
tree0b174e5ad07aa1a33dd73bb986e00a9386043b09 /source3/passdb
parent0a585102d656b267af723a5bdd258e83f532c3a6 (diff)
downloadsamba-28fb5b6f97c17af58ae99be98219de70ee95baba.tar.gz
samba-28fb5b6f97c17af58ae99be98219de70ee95baba.tar.bz2
samba-28fb5b6f97c17af58ae99be98219de70ee95baba.zip
r12313: Introduce yet another copy of the string_sub function:
talloc_string_sub. Someone with time on his hands could convert all the callers of all_string_sub to this. realloc_string_sub is *only* called from within substitute.c, it could be moved there I think. Volker (This used to be commit be6c9012da174d5d5116e5172a53bbe6486d6c38)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_ldap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 20cf2d328e..cb0bc8eeb6 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -3708,8 +3708,7 @@ char *get_ldap_filter(TALLOC_CTX *mem_ctx, const char *username)
escaped = escape_ldap_string_alloc(username);
if (escaped == NULL) goto done;
- filter = realloc_string_sub(filter, "%u", username);
- result = talloc_strdup(mem_ctx, filter);
+ result = talloc_string_sub(mem_ctx, filter, "%u", username);
done:
SAFE_FREE(filter);