diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-12-30 11:01:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:06:00 -0500 |
commit | 1de83ea53bc341c182a65f2154bb564303e40dcb (patch) | |
tree | ee7ff6c0a4b2b629db40dab0ed56a5ff9cdcfa3d /source3/passdb/pdb_sql.c | |
parent | a74bc28e15d7c9bf162bd6575ecb88284c4c86c4 (diff) | |
download | samba-1de83ea53bc341c182a65f2154bb564303e40dcb.tar.gz samba-1de83ea53bc341c182a65f2154bb564303e40dcb.tar.bz2 samba-1de83ea53bc341c182a65f2154bb564303e40dcb.zip |
r12603: NO, I'm not claiming maintainership of this.
Fix bug 3351.
Volker
(This used to be commit 082763988d9b1ba1f543452aae47ad3e3be047ef)
Diffstat (limited to 'source3/passdb/pdb_sql.c')
-rw-r--r-- | source3/passdb/pdb_sql.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source3/passdb/pdb_sql.c b/source3/passdb/pdb_sql.c index f52888bfa9..f4f6e0112a 100644 --- a/source3/passdb/pdb_sql.c +++ b/source3/passdb/pdb_sql.c @@ -536,13 +536,12 @@ char *sql_account_query_update(TALLOC_CTX *mem_ctx, const char *location, const if (query->update) { query->part1[strlen(query->part1) - 1] = '\0'; - query->part1 = - talloc_asprintf_append(query->part1, - " WHERE %s = '%s'", - config_value_read(location, - "user sid column", - CONFIG_USER_SID_DEFAULT), - sid_to_string(sid_str, pdb_get_user_sid (newpwd))); + query->part1 = talloc_asprintf( + mem_ctx, "%s WHERE %s = '%s'", query->part1, + config_value_read(location, + "user sid column", + CONFIG_USER_SID_DEFAULT), + sid_to_string(sid_str, pdb_get_user_sid (newpwd))); } else { query->part2[strlen(query->part2) - 1] = ')'; query->part1[strlen(query->part1) - 1] = ')'; |