Author: vlendec Date: 2005-12-30 11:01:29 +0000 (Fri, 30 Dec 2005) New Revision: 12603
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12603 Log: NO, I'm not claiming maintainership of this. Fix bug 3351. Volker Modified: branches/SAMBA_3_0/source/passdb/pdb_sql.c trunk/source/passdb/pdb_sql.c Changeset: Modified: branches/SAMBA_3_0/source/passdb/pdb_sql.c =================================================================== --- branches/SAMBA_3_0/source/passdb/pdb_sql.c 2005-12-30 10:45:43 UTC (rev 12602) +++ branches/SAMBA_3_0/source/passdb/pdb_sql.c 2005-12-30 11:01:29 UTC (rev 12603) @@ -536,13 +536,12 @@ 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] = ')'; Modified: trunk/source/passdb/pdb_sql.c =================================================================== --- trunk/source/passdb/pdb_sql.c 2005-12-30 10:45:43 UTC (rev 12602) +++ trunk/source/passdb/pdb_sql.c 2005-12-30 11:01:29 UTC (rev 12603) @@ -536,13 +536,12 @@ 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] = ')';
