From: Björn Baumbach Date: Wed, 19 Oct 2011 08:54:53 +0000 (+0200) Subject: s3-util: dbwrap_tool: fix fetch_string function X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=2fac12b2767dbab9a406370e258ce9b6f2322bd6;p=obnox%2Fsamba%2Fsamba-obnox.git s3-util: dbwrap_tool: fix fetch_string function We do not want truncated strings. Signed-off-by: Michael Adam Autobuild-User: Michael Adam Autobuild-Date: Wed Oct 26 04:17:05 CEST 2011 on sn-devel-104 --- diff --git a/source3/utils/dbwrap_tool.c b/source3/utils/dbwrap_tool.c index 84ff3a1fe23..fe4e6ebef43 100644 --- a/source3/utils/dbwrap_tool.c +++ b/source3/utils/dbwrap_tool.c @@ -79,7 +79,7 @@ static int dbwrap_tool_fetch_string(struct db_context *db, status = dbwrap_fetch_bystring(db, tmp_ctx, keyname, &tdbdata); if (NT_STATUS_IS_OK(status)) { - d_printf("%*.*s\n", (int)tdbdata.dsize-1, (int)tdbdata.dsize-1, + d_printf("%-*.*s\n", (int)tdbdata.dsize, (int)tdbdata.dsize, tdbdata.dptr); ret = 0; } else {