s3-util: dbwrap_tool: fix fetch_string function
authorBjörn Baumbach <bb@sernet.de>
Wed, 19 Oct 2011 08:54:53 +0000 (10:54 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 26 Oct 2011 02:17:05 +0000 (04:17 +0200)
We do not want truncated strings.

Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Oct 26 04:17:05 CEST 2011 on sn-devel-104

source3/utils/dbwrap_tool.c

index 84ff3a1fe238ae0e74760e4b9cf374bbdd32b8e2..fe4e6ebef4374b322cc8bb6768b388dafe76c9a7 100644 (file)
@@ -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 {