[Forensics-changes] [SCM] debian-forensics/libewf branch, debian, updated. debian/20100119-1

Cristian Greco cristian at regolo.cc
Sat Jan 23 20:56:26 UTC 2010


The following commit has been merged in the debian branch:
commit 94482fb3ab88be7e32c0d140b89b045d194cf858
Author: Cristian Greco <cristian at regolo.cc>
Date:   Fri Jan 22 09:09:03 2010 +0100

    Imported Upstream version 20100119

diff --git a/ChangeLog b/ChangeLog
index b513b0e..41664b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -202,10 +202,18 @@ Beta after next stable release
 * check into resume write error for 32-bit compile
 * check make distclean
 
-20091224
+20100119
+* re-applied 20091224 fixes
 * correction of return value of several ree functions
 * applied multi header patch
 
+20100110
+* fixed ewfacquire manpage
+* removed use of base offset for linen6 format
+* worked fix for restriction on large segment file and chunk
+* made ewfacquire more tollerant for missing device information
+* added digest section support for linen6 format
+
 20091114
 * moved codepage definitions to libewf_codepage.h
 * updated libbfio
diff --git a/common/config.h b/common/config.h
index 04ac949..dc3dd1a 100644
--- a/common/config.h
+++ b/common/config.h
@@ -423,13 +423,13 @@
 #define PACKAGE_NAME "libewf"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libewf 20091224"
+#define PACKAGE_STRING "libewf 20100119"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "libewf"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "20091224"
+#define PACKAGE_VERSION "20100119"
 
 /* The size of `off_t', as computed by sizeof. */
 #define SIZEOF_OFF_T 8
@@ -453,7 +453,7 @@
 /* #undef TM_IN_SYS_TIME */
 
 /* Version number of package */
-#define VERSION "20091224"
+#define VERSION "20100119"
 
 /* Number of bits in a file offset, on hosts where this is settable. */
 /* #undef _FILE_OFFSET_BITS */
diff --git a/configure b/configure
index 94e9645..860363f 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for libewf 20091224.
+# Generated by GNU Autoconf 2.63 for libewf 20100119.
 #
 # Report bugs to <forensics at hoffmannbv.nl>.
 #
@@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='libewf'
 PACKAGE_TARNAME='libewf'
-PACKAGE_VERSION='20091224'
-PACKAGE_STRING='libewf 20091224'
+PACKAGE_VERSION='20100119'
+PACKAGE_STRING='libewf 20100119'
 PACKAGE_BUGREPORT='forensics at hoffmannbv.nl'
 
 ac_unique_file="include/libewf.h.in"
@@ -1537,7 +1537,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libewf 20091224 to adapt to many kinds of systems.
+\`configure' configures libewf 20100119 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1607,7 +1607,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libewf 20091224:";;
+     short | recursive ) echo "Configuration of libewf 20100119:";;
    esac
   cat <<\_ACEOF
 
@@ -1721,7 +1721,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libewf configure 20091224
+libewf configure 20100119
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1735,7 +1735,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libewf $as_me 20091224, which was
+It was created by libewf $as_me 20100119, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -2587,7 +2587,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=libewf
- VERSION=20091224
+ VERSION=20100119
 
 
 cat >>confdefs.h <<_ACEOF
@@ -38114,7 +38114,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libewf $as_me 20091224, which was
+This file was extended by libewf $as_me 20100119, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -38177,7 +38177,7 @@ Report bugs to <bug-autoconf at gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-libewf config.status 20091224
+libewf config.status 20100119
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
diff --git a/configure.ac b/configure.ac
index 4a5cec5..075c20b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ( 2.59 )
 
 AC_INIT(
  [libewf],
- [20091224],
+ [20100119],
  [forensics at hoffmannbv.nl])
 
 AC_CONFIG_SRCDIR(
@@ -10,7 +10,7 @@ AC_CONFIG_SRCDIR(
 
 AM_INIT_AUTOMAKE(
  [libewf],
- [20091224])
+ [20100119])
 
 AC_CONFIG_MACRO_DIR([m4])
 
diff --git a/ewftools/ewfacquire.c b/ewftools/ewfacquire.c
index 0b205fc..abc8765 100644
--- a/ewftools/ewfacquire.c
+++ b/ewftools/ewfacquire.c
@@ -2429,23 +2429,16 @@ int main( int argc, char * const argv[] )
 	       &media_type,
 	       &error ) != 1 ) )
 	{
+		media_type = LIBEWF_MEDIA_TYPE_FIXED;
+
 		fprintf(
 		 stderr,
-		 "Unable to retrieve media type.\n" );
+		 "Unable to retrieve media type defaulting to: fixed.\n" );
 
 		libsystem_notify_print_error_backtrace(
 		 error );
 		liberror_error_free(
 		 &error );
-
-		device_handle_close(
-		 device_handle,
-		 NULL );
-		device_handle_free(
-		 &device_handle,
-		 NULL );
-
-		return( EXIT_FAILURE );
 	}
 	if( device_handle_media_information_fprint(
 	     device_handle,
@@ -2460,15 +2453,6 @@ int main( int argc, char * const argv[] )
 		 error );
 		liberror_error_free(
 		 &error );
-
-		device_handle_close(
-		 device_handle,
-		 NULL );
-		device_handle_free(
-		 &device_handle,
-		 NULL );
-
-		return( EXIT_FAILURE );
 	}
 	if( ( acquiry_size == 0 )
 	 || ( acquiry_size > ( media_size - acquiry_offset ) ) )
@@ -3724,7 +3708,6 @@ int main( int argc, char * const argv[] )
 		else if( acquiry_size > EWFACQUIRE_2_TIB )
 		{
 			if( ( ewf_format != LIBEWF_FORMAT_ENCASE6 )
-			 && ( ewf_format != LIBEWF_FORMAT_LINEN6 )
 			 && ( ewf_format != LIBEWF_FORMAT_EWFX ) )
 			{
 				fprintf(
@@ -4244,10 +4227,6 @@ int main( int argc, char * const argv[] )
 		 &ewfacquire_imaging_handle,
 		 NULL );
 
-		device_handle_free(
-		 &device_handle,
-		 NULL );
-
 		return( EXIT_FAILURE );
 	}
 	if( ewfacquire_abort != 0 )
diff --git a/include/libewf/definitions.h b/include/libewf/definitions.h
index 3b0b49a..a5cde75 100644
--- a/include/libewf/definitions.h
+++ b/include/libewf/definitions.h
@@ -25,11 +25,11 @@
 
 #include <libewf/types.h>
 
-#define LIBEWF_VERSION				20091224
+#define LIBEWF_VERSION				20100119
 
 /* The libewf version string
  */
-#define LIBEWF_VERSION_STRING			"20091224"
+#define LIBEWF_VERSION_STRING			"20100119"
 
 /* The libewf file access
  * bit 1	set to 1 for read access
diff --git a/libewf.pc b/libewf.pc
index e41fae7..eb15831 100644
--- a/libewf.pc
+++ b/libewf.pc
@@ -5,7 +5,7 @@ includedir=${prefix}/include
 
 Name: libewf
 Description: Library to support the Expert Witness Compression Format (EWF)
-Version: 20091224
+Version: 20100119
 Libs: -L${libdir} -lewf
 Libs.private: -lz  
 Cflags: -I${includedir}
diff --git a/libewf.spec b/libewf.spec
index 288da67..d781b36 100644
--- a/libewf.spec
+++ b/libewf.spec
@@ -1,5 +1,5 @@
 Name: libewf
-Version: 20091224
+Version: 20100119
 Release: 1
 Summary: Library to support the Expert Witness Compression Format
 Group: System Environment/Libraries
diff --git a/libewf/libewf_definitions.h b/libewf/libewf_definitions.h
index 51d3ad7..7eb245e 100644
--- a/libewf/libewf_definitions.h
+++ b/libewf/libewf_definitions.h
@@ -37,11 +37,11 @@
 #include <libewf/definitions.h>
 
 #else
-#define LIBEWF_VERSION				20091224
+#define LIBEWF_VERSION				20100119
 
 /* The libewf version string
  */
-#define LIBEWF_VERSION_STRING			"20091224"
+#define LIBEWF_VERSION_STRING			"20100119"
 
 /* The libewf file access
  * bit 1	set to 1 for read access
diff --git a/libewf/libewf_segment_file.c b/libewf/libewf_segment_file.c
index dc1ab1d..3875632 100644
--- a/libewf/libewf_segment_file.c
+++ b/libewf/libewf_segment_file.c
@@ -1134,21 +1134,35 @@ ssize_t libewf_segment_file_write_chunks_section_correction(
 
 		return( -1 );
 	}
-	if( ( ( io_handle->format == LIBEWF_FORMAT_ENCASE6 )
-	  && ( chunks_section_size >= (size64_t) INT64_MAX ) )
-	 || ( chunks_section_size >= (size64_t) INT32_MAX ) )
+	if( io_handle->format == LIBEWF_FORMAT_ENCASE6 )
 	{
-		liberror_error_set(
-		 error,
-		 LIBERROR_ERROR_DOMAIN_ARGUMENTS,
-		 LIBERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
-		 "%s: invalid chunk section size value exceeds maximum.",
-		 function );
+		if( chunks_section_size >= (size64_t) INT64_MAX )
+		{
+			liberror_error_set(
+			 error,
+			 LIBERROR_ERROR_DOMAIN_ARGUMENTS,
+			 LIBERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
+			 "%s: invalid chunk section size value exceeds maximum.",
+			 function );
 
-		return( -1 );
+			return( -1 );
+		}
+	}
+	else
+	{
+		if( chunks_section_size >= (size64_t) INT32_MAX )
+		{
+			liberror_error_set(
+			 error,
+			 LIBERROR_ERROR_DOMAIN_ARGUMENTS,
+			 LIBERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
+			 "%s: invalid chunk section size value exceeds maximum.",
+			 function );
+
+			return( -1 );
+		}
 	}
-	if( ( io_handle->format == LIBEWF_FORMAT_ENCASE6 )
-	 || ( io_handle->format == LIBEWF_FORMAT_LINEN6 ) )
+	if( io_handle->format == LIBEWF_FORMAT_ENCASE6 )
 	{
 		base_offset = chunks_section_offset;
 	}
@@ -1916,7 +1930,8 @@ ssize_t libewf_segment_file_write_close(
 			}
 			total_write_count += write_count;
 		}
-		if( io_handle->format == LIBEWF_FORMAT_ENCASE6 )
+		if( ( io_handle->format == LIBEWF_FORMAT_ENCASE6 )
+		 || ( io_handle->format == LIBEWF_FORMAT_LINEN6 ) )
 		{
 			/* Write the digest section if required
 			 */
diff --git a/libewf/libewf_write_io_handle.c b/libewf/libewf_write_io_handle.c
index 6f87734..782f37e 100644
--- a/libewf/libewf_write_io_handle.c
+++ b/libewf/libewf_write_io_handle.c
@@ -290,7 +290,6 @@ int libewf_write_io_handle_initialize_values(
 	if( media_values->media_size > LIBEWF_2_TIB )
 	{
 		if( ( io_handle->format != LIBEWF_FORMAT_ENCASE6 )
-		 && ( io_handle->format != LIBEWF_FORMAT_LINEN6 )
 		 && ( io_handle->format != LIBEWF_FORMAT_EWFX ) )
 		{
 			liberror_error_set(
@@ -717,11 +716,6 @@ int libewf_write_io_handle_initialize_resume(
 		                                             - write_io_handle->resume_segment_file_offset;
 		write_io_handle->segment_amount_of_chunks    = segment_file_handle->amount_of_chunks; 
 
-		/* TODO set the following write io handle values to the correct value
-		 * currently only required for ENCASE1/SMART
-		 */
-		write_io_handle->chunks_section_number       = 0;
-
 		if( libbfio_pool_reopen(
 		     io_handle->file_io_pool,
 		     segment_file_handle->file_io_pool_entry,
@@ -909,13 +903,13 @@ int libewf_write_io_handle_calculate_chunks_per_segment(
 int libewf_write_io_handle_calculate_chunks_per_chunks_section(
      uint32_t *chunks_per_chunks_section,
      uint32_t maximum_section_amount_of_chunks,
+     uint32_t segment_amount_of_chunks,
      uint32_t chunks_per_segment,
-     uint32_t chunks_section_number,
      uint8_t unrestrict_offset_amount,
      liberror_error_t **error )
 {
-	static char *function              = "libewf_write_io_handle_calculate_chunks_per_chunks_section";
-	int64_t remaining_amount_of_chunks = 0;
+	static char *function               = "libewf_write_io_handle_calculate_chunks_per_chunks_section";
+	uint32_t remaining_amount_of_chunks = 0;
 
 	if( chunks_per_chunks_section == NULL )
 	{
@@ -939,41 +933,31 @@ int libewf_write_io_handle_calculate_chunks_per_chunks_section(
 
 		return( -1 );
 	}
-	if( chunks_section_number == 0 )
+	if( segment_amount_of_chunks > chunks_per_segment )
 	{
 		liberror_error_set(
 		 error,
-		 LIBERROR_ERROR_DOMAIN_ARGUMENTS,
-		 LIBERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,
-		 "%s: unsupported section number: %" PRIu8 ".",
-		 function,
-		 chunks_section_number );
+		 LIBERROR_ERROR_DOMAIN_RUNTIME,
+		 LIBERROR_RUNTIME_ERROR_VALUE_OUT_OF_RANGE,
+		 "%s: segment amount of chunks exceeds chunk per segment.",
+		 function );
 
 		return( -1 );
 	}
-	remaining_amount_of_chunks = (int64_t) chunks_per_segment;
+	remaining_amount_of_chunks = chunks_per_segment - segment_amount_of_chunks;
 
-	if( chunks_section_number > 1 )
-	{
-		remaining_amount_of_chunks -= ( chunks_section_number - 1 )
-		                            * maximum_section_amount_of_chunks;
-	}
-	if( remaining_amount_of_chunks <= 0 )
-	{
-		return( -1 );
-	}
 	if( ( unrestrict_offset_amount == 0 )
-	 && ( remaining_amount_of_chunks > (int64_t) maximum_section_amount_of_chunks ) )
+	 && ( remaining_amount_of_chunks > maximum_section_amount_of_chunks ) )
 	{
-		remaining_amount_of_chunks = (int64_t) maximum_section_amount_of_chunks;
+		remaining_amount_of_chunks = maximum_section_amount_of_chunks;
 	}
 	/* Fail safe no more than 2^31 values are allowed
 	 */
-	if( remaining_amount_of_chunks > (int64_t) INT32_MAX )
+	if( remaining_amount_of_chunks > (uint32_t) INT32_MAX )
 	{
 		remaining_amount_of_chunks = INT32_MAX;
 	}
-	*chunks_per_chunks_section = (uint32_t) remaining_amount_of_chunks;
+	*chunks_per_chunks_section = remaining_amount_of_chunks;
 
 	return( 1 );
 }
@@ -1902,7 +1886,6 @@ ssize_t libewf_write_io_handle_write_new_chunk(
 			}
 		}
 		write_io_handle->create_chunks_section     = 1;
-		write_io_handle->chunks_section_number     = 0;
 		write_io_handle->chunks_per_chunks_section = 0;
 		write_io_handle->segment_amount_of_chunks  = 0;
 
@@ -2076,10 +2059,6 @@ ssize_t libewf_write_io_handle_write_new_chunk(
 
 			return( -1 );
 		}
-		/* Start with chunks section number number 1, value is initialized with 0
-		 */
-		write_io_handle->chunks_section_number += 1;
-
 		/* Recalculate the amount of chunks per segment for a better segment file fill when compression is used
 		 */
 		if( segment_table->segment_file_handle[ segment_number ]->amount_of_chunks == 0 )
@@ -2119,8 +2098,8 @@ ssize_t libewf_write_io_handle_write_new_chunk(
 		if( libewf_write_io_handle_calculate_chunks_per_chunks_section(
 		     &( write_io_handle->chunks_per_chunks_section ),
 		     write_io_handle->maximum_section_amount_of_chunks,
+		     write_io_handle->segment_amount_of_chunks,
 		     write_io_handle->chunks_per_segment,
-		     write_io_handle->chunks_section_number,
 		     write_io_handle->unrestrict_offset_amount,
 		     error ) != 1 )
 		{
diff --git a/libewf/libewf_write_io_handle.h b/libewf/libewf_write_io_handle.h
index cf5a6cd..c303146 100644
--- a/libewf/libewf_write_io_handle.h
+++ b/libewf/libewf_write_io_handle.h
@@ -111,10 +111,6 @@ struct libewf_write_io_handle
 	 */
 	off64_t chunks_section_offset;
 
-	/* The current chunks section number
-	 */
-	uint32_t chunks_section_number;
-
 	/* Value to indicate if the offset table should not be restricted
 	 * to the maximum amount of offsets
 	 */
@@ -180,8 +176,8 @@ int libewf_write_io_handle_calculate_chunks_per_segment(
 int libewf_write_io_handle_calculate_chunks_per_chunks_section(
      uint32_t *chunks_per_chunks_section,
      uint32_t maximum_section_amount_of_chunks,
+     uint32_t segment_amount_of_chunks,
      uint32_t chunks_per_segment,
-     uint32_t chunks_section_number,
      uint8_t unrestrict_offset_amount,
      liberror_error_t **error );
 
diff --git a/macosx/Introduction.rtf b/macosx/Introduction.rtf
index 14e5291..9a49515 100644
--- a/macosx/Introduction.rtf
+++ b/macosx/Introduction.rtf
@@ -4,4 +4,4 @@
 \margl1440\margr1440\vieww9880\viewh13400\viewkind0
 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
 
-\f0\fs24 \cf0 This will install a universal build of libewf 20091224 and the ewftools.}
+\f0\fs24 \cf0 This will install a universal build of libewf 20100119 and the ewftools.}
diff --git a/manuals/ewfacquire.1 b/manuals/ewfacquire.1
index dcf53c9..3e803fc 100644
--- a/manuals/ewfacquire.1
+++ b/manuals/ewfacquire.1
@@ -1,4 +1,4 @@
-.Dd October 17, 2009
+.Dd January 9, 2010
 .Dt ewfacquire
 .Os libewf
 .Sh NAME
@@ -131,7 +131,7 @@ should mimic EnCase it will wipe all of sectors specified as error granularity.
 .Pp
 Empty block compression detects blocks of sectors with entirely the same byte data and compresses them using the default compression level.
 .Pp
-The encase6 and linen6 format allow for segment files greater than 2 GiB (2147483648 bytes).
+The encase6 format allows for segment files greater than 2 GiB (2147483648 bytes).
 .Sh ENVIRONMENT
 None
 .Sh FILES

-- 
debian-forensics/libewf



More information about the forensics-changes mailing list