diff --git a/tsk/auto/auto_db.cpp b/tsk/auto/auto_db.cpp index 37190621f3e335155071d2f228bca0812bebee1a..e87d17891dd9128584b9db890d66bc02dd338b56 100644 --- a/tsk/auto/auto_db.cpp +++ b/tsk/auto/auto_db.cpp @@ -193,19 +193,20 @@ uint8_t uint8_t TskAutoDb::addImageDetails(const char *const img_ptrs[], int a_num) { - string md5 = ""; -#if HAVE_LIBEWF - if (m_img_info->itype == TSK_IMG_TYPE_EWF_EWF) { +// string md5 = ""; +//#if HAVE_LIBEWF +// if (m_img_info->itype == TSK_IMG_TYPE_EWF_EWF) { // @@@ This shoudl really probably be inside of a tsk_img_ method - IMG_EWF_INFO *ewf_info = (IMG_EWF_INFO *)m_img_info; - if (ewf_info->md5hash_isset) { - md5 = ewf_info->md5hash; - } - } -#endif +// IMG_EWF_INFO *ewf_info = (IMG_EWF_INFO *)m_img_info; +// if (ewf_info->md5hash_isset) { +// md5 = ewf_info->md5hash; +// } +// } +//#endif if (m_db->addImageInfo(m_img_info->itype, m_img_info->sector_size, - m_curImgId, m_curImgTZone, m_img_info->size, md5)) { + // m_curImgId, m_curImgTZone, m_img_info->size, md5)) { + m_curImgId, m_curImgTZone)) { return 1; } diff --git a/tsk/auto/db_sqlite.cpp b/tsk/auto/db_sqlite.cpp index 39a1c132a1079425b7a0aeeedc88150a859e564a..4679b0a003abd594842859bbfbef976cd1d98ec9 100644 --- a/tsk/auto/db_sqlite.cpp +++ b/tsk/auto/db_sqlite.cpp @@ -26,7 +26,8 @@ using std::sort; using std::for_each; -#define TSK_SCHEMA_VER 3 +//#define TSK_SCHEMA_VER 3 +#define TSK_SCHEMA_VER 2 /** * Set the locations and logging object. Must call @@ -238,7 +239,9 @@ int "Error creating tsk_objects table: %s\n") || attempt_exec - ("CREATE TABLE tsk_image_info (obj_id INTEGER PRIMARY KEY, type INTEGER, ssize INTEGER, tzone TEXT, size INTEGER, md5 TEXT);", +// ("CREATE TABLE tsk_image_info (obj_id INTEGER PRIMARY KEY, type INTEGER, ssize INTEGER, tzone TEXT, size INTEGER, md5 TEXT);", + + ("CREATE TABLE tsk_image_info (obj_id INTEGER PRIMARY KEY, type INTEGER, ssize INTEGER, tzone TEXT);", "Error creating tsk_image_info table: %s\n") || attempt_exec @@ -421,9 +424,14 @@ int objId = sqlite3_last_insert_rowid(m_db); +// snprintf(stmt, 1024, +// "INSERT INTO tsk_image_info (obj_id, type, ssize, tzone, size, md5) VALUES (%lld, %d, %d, '%s', %"PRIuOFF", '%s');", +// objId, type, ssize, timezone.c_str(), size, md5.c_str()); + snprintf(stmt, 1024, - "INSERT INTO tsk_image_info (obj_id, type, ssize, tzone, size, md5) VALUES (%lld, %d, %d, '%s', %"PRIuOFF", '%s');", - objId, type, ssize, timezone.c_str(), size, md5.c_str()); + "INSERT INTO tsk_image_info (obj_id, type, ssize, tzone) VALUES (%lld, %d, %d, '%s');", + objId, type, ssize, timezone.c_str()); + return attempt_exec(stmt, "Error adding data to tsk_image_info table: %s\n"); }