From 1a697e4b2eac595e6eb7cf0acb4917b2c2406bae Mon Sep 17 00:00:00 2001 From: Tomasz Kojm Date: Tue, 3 May 2011 16:16:53 -0700 Subject: [PATCH] sigtool/sigtool.c: fix formatting of hash dbs (bb#2765) --- ChangeLog | 4 ++++ sigtool/sigtool.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 621d0aff1..6b5e6a2ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue May 3 16:14:27 PDT 2011 (tk) +--------------------------------- + * sigtool/sigtool.c: fix formatting of hash dbs (bb#2765) + Wed Apr 27 15:07:22 CEST 2011 (tk) ---------------------------------- * freshclam: add mirror statistics mechanism diff --git a/sigtool/sigtool.c b/sigtool/sigtool.c index a074b3700..b50209657 100644 --- a/sigtool/sigtool.c +++ b/sigtool/sigtool.c @@ -45,6 +45,7 @@ #endif #include #include +#include #ifdef HAVE_TERMIOS_H #include @@ -170,9 +171,9 @@ static int hashsig(const struct optstruct *opts, unsigned int mdb, int type) if((sb.st_mode & S_IFMT) == S_IFREG) { if((hash = cli_hashfile(opts->filename[i], type))) { if(mdb) - mprintf("%u:%s:%s\n", (unsigned int) sb.st_size, hash, opts->filename[i]); + mprintf("%u:%s:%s\n", (unsigned int) sb.st_size, hash, basename(opts->filename[i])); else - mprintf("%s:%u:%s\n", hash, (unsigned int) sb.st_size, opts->filename[i]); + mprintf("%s:%u:%s\n", hash, (unsigned int) sb.st_size, basename(opts->filename[i])); free(hash); } else { mprintf("!hashsig: Can't generate hash for %s\n", opts->filename[i]);