[Forensics-changes] [scrounge-ntfs] 01/01: Imported Debian patch 0.9-7
Joao Eriberto Mota Filho
eriberto at moszumanska.debian.org
Wed Jun 24 19:34:17 UTC 2015
This is an automated email from the git hooks/post-receive script.
eriberto pushed a commit to branch debian
in repository scrounge-ntfs.
commit 448b2b64989596aeb6e3efbfdfe64f3b88f5de4e
Author: Joao Eriberto Mota Filho <eriberto at debian.org>
Date: Wed Jun 24 12:14:17 2015 -0300
Imported Debian patch 0.9-7
---
debian/changelog | 49 ++++++-
debian/compat | 2 +-
debian/control | 17 ++-
debian/copyright | 104 ++++++++------
debian/{scrounge-ntfs.docs => docs} | 0
debian/patches/01-fix-manpage | 31 +++++
debian/patches/01-man-page-link.patch | 12 --
debian/patches/02-fix-help-message | 41 ++++++
debian/patches/03-fix-max-size | 62 +++++++++
debian/patches/04-clean-code-add-option | 234 ++++++++++++++++++++++++++++++++
debian/patches/series | 7 +-
debian/rules | 15 +-
debian/source.lintian-overrides | 3 -
debian/source/format | 1 +
debian/watch | 2 +-
15 files changed, 498 insertions(+), 82 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index e24ef0b..b06d395 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,48 @@
+scrounge-ntfs (0.9-7) unstable; urgency=medium
+
+ * Team upload.
+ * Some data imported from Git:
+ [ Christophe Monniez ] (2010)
+ * Adding a build depend on quilt.
+ * Adding patch to fix url in man page.
+ * Bumping Standards-Version to 3.8.3.
+ [ Daniel Baumann ] (2009)
+ * Adding stuff in rules that doesn't get done by dh automatically.
+ * Minimizing rules file.
+ * Migrations:
+ - debian/copyright to 1.0 format.
+ - DebSrc to 3.0 format.
+ - DH level to 9.
+ - Using dh-autoreconf.
+ * New upstream homepage.
+ * debian/control:
+ - Bumped Standards-Version to 3.9.6.
+ - Removed quilt from Build-Depends field.
+ - Rewrote the long description.
+ - Updated the Vcs-* fields.
+ * debian/copyright: full updated.
+ * debian/patches/:
+ - 01-man-page-link.patch:
+ ~ Added a header.
+ ~ Added a new fix. Now for a spelling error. (Closes: #690923)
+ ~ Renamed to 01-fix-manpage.
+ ~ Updated again the upstream homepage. (Closes: #566622)
+ ~ Updated the upstream e-mail address.
+ - 02-fix-help-message: added to fix the program name in its help. Thanks
+ to Nelson A. de Oliveira <naoliv at debian.org>. (Closes: #650649)
+ - 03-fix-max-size: added to allow disks grather than 2TB. Thanks to
+ doug Springer <gpib at rickyrockrat.net> (Closes: #690802, LP: #1067814)
+ - 04-clean-code-add-option: added but disabled. With this patch, the
+ program didn't work fine.
+ * debian/scrounge-ntfs.docs: renamed to docs.
+ * debian/source.lintian-overrides: removed. Using 'Team upload' now.
+ * debian/rules:
+ - Added DEB_BUILD_MAINT_OPTIONS variable to improve the GCC hardening.
+ - Removed unnecessary targets.
+ * debian/watch: updated and improved.
+
+ -- Joao Eriberto Mota Filho <eriberto at debian.org> Wed, 24 Jun 2015 12:14:17 -0300
+
scrounge-ntfs (0.9-6) unstable; urgency=low
* Updating package to standards version 3.8.2.
@@ -12,7 +57,7 @@ scrounge-ntfs (0.9-5) unstable; urgency=low
* Replacing obsolete dh_clean -k with dh_prep.
* Prefixing debhelper files with package name.
* Passing flags directly to configure.
- * Updating year in copyrgith file.
+ * Updating year in copyrigth file.
* Updating to standards 3.8.1.
* Tidy rules file.
@@ -40,7 +85,7 @@ scrounge-ntfs (0.9-2) unstable; urgency=low
* Rewrapping package description.
* Correcting license type in copyright.
* Rewrapping copyright.
- * Removing docs; no usfull information in these files.
+ * Removing docs; no useful information in these files.
* Adding AUTHORS to docs.
* Setting default CFLAGS in rules.
* Don't ignore make failure in clean target of rules.
diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index fa54d0b..883cbe5 100644
--- a/debian/control
+++ b/debian/control
@@ -3,15 +3,18 @@ Section: admin
Priority: optional
Maintainer: Debian Forensics <forensics-devel at lists.alioth.debian.org>
Uploaders: Juan Angulo Moreno <juan at apuntale.com>
-Build-Depends: debhelper (>= 7), autotools-dev, quilt
-Standards-Version: 3.8.3
-Homepage: http://memberwebs.com/stef/software/scrounge/
-Vcs-Browser: http://git.debian.net/?p=debian-forensics/scrounge-ntfs.git
-Vcs-Git: git://git.debian.net/git/debian-forensics/scrounge-ntfs.git
+Build-Depends: debhelper (>= 9), dh-autoreconf
+Standards-Version: 3.9.6
+Homepage: http://thewalter.net/stef/software/scrounge/
+Vcs-Browser: http://anonscm.debian.org/cgit/forensics/scrounge-ntfs.git
+Vcs-Git: git://anonscm.debian.org/forensics/scrounge-ntfs.git
Package: scrounge-ntfs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Data recovery program for NTFS filesystems
- Utility that can rescue data from corrupted NTFS partitions writes the files
- retrieved to another working file system.
+ Scrounge NTFS is a data recovery program for NTFS filesystems. It reads each
+ block of the hard disk and try to rebuild the original filesystem tree into
+ a directory.
+ .
+ This package is useful in forensics investigations.
diff --git a/debian/copyright b/debian/copyright
index 3b8fb34..243aa11 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,57 +1,75 @@
-Author: Stefan Walter <stef at memberwebs.com>
-Download: http://memberwebs.com/stef/software/scrounge/
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Scrounge NTFS
+Source: http://thewalter.net/stef/software/scrounge/
Files: *
-Copyright: (C) 2004-2008 Stefan Walter <stef at memberwebs.com>
-License: BSD-3
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
+Copyright: 2004-2008 Stefan Walter <stef at thewalter.net>
+License: BSD-3-Clause
+
+Files: src/*
+Copyright: ? Stefan Walter <stef at thewalter.net>
+License: public-domain
+
+Files: debian/*
+Copyright: 2008 Juan Angulo Moreno <juan at apuntale.com>
+ 2008-2009 Daniel Baumann <daniel at debian.org>
+ 2010 Christophe Monniez <christophe.monniez at fccu.be>
+ 2015 Joao Eriberto Mota Filho <eriberto at debian.org>
+License: GPL-2+
+
+License: BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
are met:
.
- * Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
+ * Redistributions of source code must retain the above
+ copyright notice, this list of conditions and the
+ following disclaimer.
+ * Redistributions in binary form must reproduce the
+ above copyright notice, this list of conditions and
+ the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ * The names of contributors to this software may not be
+ used to endorse or promote products derived from this
+ software without specific prior written permission.
.
- * Redistributions in binary form must reproduce the
- above copyright notice, this list of conditions and
- the following disclaimer in the documentation and/or
- other materials provided with the distribution.
- .
- * The names of contributors to this software may not be
- used to endorse or promote products derived from this
- software without specific prior written permission.
- .
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
-Files: debian/*
-Copyright:
- (C) 2008 Juan Angulo Moreno <juan at apuntale.com>
- (C) 2008-2009 Daniel Baumann <daniel at debian.org>
+License: public-domain
+ This software is in the public domain.
+ .
+ The software is provided "as is", without warranty of any kind,
+ express or implied, including but not limited to the warranties
+ of merchantability, fitness for a particular purpose, and
+ noninfringement. In no event shall the author(s) be liable for any
+ claim, damages, or other liability, whether in an action of
+ contract, tort, or otherwise, arising from, out of, or in connection
+ with the software or the use or other dealings in the software.
+
License: GPL-2+
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
.
- This program is distributed in the hope that it will be useful,
+ This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ along with this program. If not, see <https://www.gnu.org/licenses/>
.
- On Debian systems, the complete text of the GNU General Public License
- can be found in /usr/share/common-licenses/GPL-2 file.
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/debian/scrounge-ntfs.docs b/debian/docs
similarity index 100%
rename from debian/scrounge-ntfs.docs
rename to debian/docs
diff --git a/debian/patches/01-fix-manpage b/debian/patches/01-fix-manpage
new file mode 100644
index 0000000..bab0338
--- /dev/null
+++ b/debian/patches/01-fix-manpage
@@ -0,0 +1,31 @@
+Description: fix the upstream homepage in manpage. (Closes: #566622)
+Author: Christophe Monniez <christophe.monniez at fccu.be>
+Reviewed-by: Joao Eriberto Mota Filho <eriberto at debian.org>
+Last-Update: 2015-06-24
+
+Description: fix a spelling error (Closes: #690923);
+ update the upstream e-mail address.
+Author: Joao Eriberto Mota Filho <eriberto at debian.org>
+Last-Update: 2015-06-24
+Index: scrounge-ntfs-0.9/doc/scrounge-ntfs.8
+===================================================================
+--- scrounge-ntfs-0.9.orig/doc/scrounge-ntfs.8
++++ scrounge-ntfs-0.9/doc/scrounge-ntfs.8
+@@ -95,7 +95,7 @@ The beginning of the NTFS partition (in
+ The end of the NTFS partition (in sectors)
+ .El
+ .Sh NOTES
+-If you plan on using this program sucessfully you should prepare
++If you plan on using this program successfully you should prepare
+ in advance by storing a copy of the partition information. Use the
+ .Fl l
+ option to do this. Eventually searching for disk partition information
+@@ -105,6 +105,6 @@ When only one partition exists on a disk
+ first partition there are ways to guess at the sector sizes and MFT
+ location. See the scrounge-ntfs web page for more info:
+ .Pp
+-http://memberwebs.com/swalter/software/scrounge/
++http://thewalter.net/stef/software/scrounge
+ .Sh AUTHOR
+-.An Stef Walter Aq stef at memberwebs.com
++.An Stef Walter Aq stef at thewalter.net
diff --git a/debian/patches/01-man-page-link.patch b/debian/patches/01-man-page-link.patch
deleted file mode 100644
index 461e4e3..0000000
--- a/debian/patches/01-man-page-link.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: scrounge-ntfs/doc/scrounge-ntfs.8
-===================================================================
---- scrounge-ntfs.orig/doc/scrounge-ntfs.8 2010-01-25 07:58:19.794777120 +0100
-+++ scrounge-ntfs/doc/scrounge-ntfs.8 2010-01-25 07:58:33.106815651 +0100
-@@ -105,6 +105,6 @@
- first partition there are ways to guess at the sector sizes and MFT
- location. See the scrounge-ntfs web page for more info:
- .Pp
--http://memberwebs.com/swalter/software/scrounge/
-+http://memberwebs.com/stef/software/scrounge/
- .Sh AUTHOR
- .An Stef Walter Aq stef at memberwebs.com
diff --git a/debian/patches/02-fix-help-message b/debian/patches/02-fix-help-message
new file mode 100644
index 0000000..4f5bc28
--- /dev/null
+++ b/debian/patches/02-fix-help-message
@@ -0,0 +1,41 @@
+Description: fix the program name in its help. (Closes: #650649)
+Author: Joao Eriberto Mota Filho <eriberto at debian.org>
+Last-Update: 2015-06-24
+Index: scrounge-ntfs-0.9/src/main.c
+===================================================================
+--- scrounge-ntfs-0.9.orig/src/main.c
++++ scrounge-ntfs-0.9/src/main.c
+@@ -24,13 +24,13 @@
+ #ifdef _WIN32
+
+ const char kPrintHelp[] = "\
+-usage: scrounge -l \n\
++usage: scrounge-ntfs -l \n\
+ List all drive partition information. \n\
+ \n\
+-usage: scrounge [-d drive] -s \n\
++usage: scrounge-ntfs [-d drive] -s \n\
+ Search drive for NTFS partitions. \n\
+ \n\
+-usage: scrounge [-d drive] [-m mftoffset] [-c clustersize] [-o outdir] start end \n\
++usage: scrounge-ntfs [-d drive] [-m mftoffset] [-c clustersize] [-o outdir] start end \n\
+ Scrounge data from a partition \n\
+ -d Drive number \n\
+ -m Offset to mft (in sectors) \n\
+@@ -44,13 +44,13 @@ usage: scrounge [-d drive] [-m mftoffset
+ #else /* Not WIN32 */
+
+ const char kPrintHelp[] = "\
+-usage: scrounge -l disk \n\
++usage: scrounge-ntfs -l disk \n\
+ List all drive partition information. \n\
+ \n\
+-usage: scrounge -s disk \n\
++usage: scrounge-ntfs -s disk \n\
+ Search drive for NTFS partitions. \n\
+ \n\
+-usage: scrounge [-m mftoffset] [-c clustersize] [-o outdir] disk start end \n\
++usage: scrounge-ntfs [-m mftoffset] [-c clustersize] [-o outdir] disk start end \n\
+ Scrounge data from a partition \n\
+ -m Offset to mft (in sectors) \n\
+ -c Cluster size (in sectors, default of 8) \n\
diff --git a/debian/patches/03-fix-max-size b/debian/patches/03-fix-max-size
new file mode 100644
index 0000000..8ecb035
--- /dev/null
+++ b/debian/patches/03-fix-max-size
@@ -0,0 +1,62 @@
+Description: allow disks grather than 2TB. (Closes: #690802, LP: #1067814)
+Author: doug Springer <gpib at rickyrockrat.net>
+Reviewed-by: Joao Eriberto Mota Filho <eriberto at debian.org>
+Last-Update: 2015-06-24
+Index: scrounge-ntfs-0.9/src/main.c
+===================================================================
+--- scrounge-ntfs-0.9.orig/src/main.c
++++ scrounge-ntfs-0.9/src/main.c
+@@ -77,7 +77,7 @@ bool g_verifyMode = false;
+ int main(int argc, char* argv[])
+ {
+ int ch = 0;
+- int temp = 0;
++ unsigned long temp = 0;
+ int mode = 0;
+ int raw = 0;
+ partitioninfo pi;
+@@ -103,7 +103,7 @@ int main(int argc, char* argv[])
+ /* cluster size */
+ case 'c':
+ {
+- temp = atoi(optarg);
++ temp = atol(optarg);
+
+ /* TODO: Check this range */
+ if(temp <= 0 || temp > 128)
+@@ -118,7 +118,7 @@ int main(int argc, char* argv[])
+ /* drive number */
+ case 'd':
+ {
+- temp = atoi(optarg);
++ temp = atol(optarg);
+
+ /* TODO: Check this range */
+ if(temp < 0 || temp > 128)
+@@ -142,7 +142,7 @@ int main(int argc, char* argv[])
+ /* mft offset */
+ case 'm':
+ {
+- temp = atoi(optarg);
++ temp = atol(optarg);
+
+ /* TODO: Check this range */
+ if(temp < 0)
+@@ -217,14 +217,14 @@ int main(int argc, char* argv[])
+ if(argc > 2)
+ warnx("ignoring extra arguments");
+
+- temp = atoi(argv[0]);
++ temp = atol(argv[0]);
+ if(temp < 0)
+ errx(2, "invalid start sector (must be positive)");
+
+ pi.first = temp;
+
+- temp = atoi(argv[1]);
+- if(temp < 0 || ((unsigned int)temp) <= pi.first)
++ temp = atol(argv[1]);
++ if(temp < 0 || temp <= pi.first)
+ errx(2, "invalid end sector (must be positive and greater than first)");
+
+ pi.end = temp;
diff --git a/debian/patches/04-clean-code-add-option b/debian/patches/04-clean-code-add-option
new file mode 100644
index 0000000..348b27c
--- /dev/null
+++ b/debian/patches/04-clean-code-add-option
@@ -0,0 +1,234 @@
+Description: provides source code enhancements and add the -i option.
+ (Closes: #789806, LP: #1067817)
+Author: doug Springer <gpib at rickyrockrat.net>
+Reviewed-by: Joao Eriberto Mota Filho <eriberto at debian.org>
+Last-Update: 2015-06-24
+Index: scrounge-ntfs-0.9/src/compat.h
+===================================================================
+--- scrounge-ntfs-0.9.orig/src/compat.h
++++ scrounge-ntfs-0.9/src/compat.h
+@@ -158,7 +158,10 @@ typedef unsigned int uint;
+ #endif
+ #endif
+ #endif
+-
++
++#ifdef HAVE_SYS_STAT_H
++#include <sys/stat.h>
++#endif
+
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+Index: scrounge-ntfs-0.9/src/drive.h
+===================================================================
+--- scrounge-ntfs-0.9.orig/src/drive.h
++++ scrounge-ntfs-0.9/src/drive.h
+@@ -34,6 +34,7 @@
+ struct _ntfsx_mftmap;
+ struct _drivelocks;
+
++#define OP_FLAG_IGNORE 0x0001 /**Do not copy files that already exist in output. */
+ typedef struct _partitioninfo
+ {
+ uint32 first; /* The first sector (in sectors) */
+@@ -41,6 +42,9 @@ typedef struct _partitioninfo
+ uint32 mft; /* Offset into the MFT (in sectors) */
+ byte cluster; /* Cluster size (in sectors) */
+ int device; /* A handle to an open device */
++ uint32 flags; /**flags for operation. Ignore, for one */
++ char *logfile; /**Log file for err_set_file */
++ void *fp; /**FILE * for filename, above */
+
+ /* Some other context stuff about the drive */
+ struct _drivelocks* locks;
+Index: scrounge-ntfs-0.9/src/main.c
+===================================================================
+--- scrounge-ntfs-0.9.orig/src/main.c
++++ scrounge-ntfs-0.9/src/main.c
+@@ -21,48 +21,6 @@
+ #include "scrounge.h"
+ #include "compat.h"
+
+-#ifdef _WIN32
+-
+-const char kPrintHelp[] = "\
+-usage: scrounge-ntfs -l \n\
+- List all drive partition information. \n\
+- \n\
+-usage: scrounge-ntfs [-d drive] -s \n\
+- Search drive for NTFS partitions. \n\
+- \n\
+-usage: scrounge-ntfs [-d drive] [-m mftoffset] [-c clustersize] [-o outdir] start end \n\
+- Scrounge data from a partition \n\
+- -d Drive number \n\
+- -m Offset to mft (in sectors) \n\
+- -c Cluster size (in sectors, default of 8) \n\
+- -o Directory to put scrounged files in \n\
+- start First sector of partition \n\
+- end Last sector of partition \n\
+- \n\
+-";
+-
+-#else /* Not WIN32 */
+-
+-const char kPrintHelp[] = "\
+-usage: scrounge-ntfs -l disk \n\
+- List all drive partition information. \n\
+- \n\
+-usage: scrounge-ntfs -s disk \n\
+- Search drive for NTFS partitions. \n\
+- \n\
+-usage: scrounge-ntfs [-m mftoffset] [-c clustersize] [-o outdir] disk start end \n\
+- Scrounge data from a partition \n\
+- -m Offset to mft (in sectors) \n\
+- -c Cluster size (in sectors, default of 8) \n\
+- -o Directory to put scrounged files in \n\
+- disk The raw disk partitios (ie: /dev/hda) \n\
+- start First sector of partition \n\
+- end Last sector of partition \n\
+- \n\
+-";
+-
+-#endif
+-
+ #define MODE_SCROUNGE 1
+ #define MODE_LIST 2
+ #define MODE_SEARCH 3
+@@ -82,6 +40,7 @@ int main(int argc, char* argv[])
+ int raw = 0;
+ partitioninfo pi;
+ char driveName[MAX_PATH + 1];
++ FILE *f=NULL;
+ #ifdef _WIN32
+ int drive = 0;
+ #endif
+@@ -91,11 +50,7 @@ int main(int argc, char* argv[])
+ /* TODO: We need to be able to autodetect the cluster size */
+ pi.cluster = 8;
+
+-#ifdef _WIN32
+- while((ch = getopt(argc, argv, "c:d:hlm:o:sv")) != -1)
+-#else
+- while((ch = getopt(argc, argv, "c:hlm:o:sv")) != -1)
+-#endif
++ while((ch = getopt(argc, argv, "c:d:e:hilm:o:sv")) != -1)
+ {
+ switch(ch)
+ {
+@@ -114,9 +69,9 @@ int main(int argc, char* argv[])
+ }
+ break;
+
+-#ifdef _WIN32
+ /* drive number */
+ case 'd':
++#ifdef _WIN32
+ {
+ temp = atol(optarg);
+
+@@ -126,8 +81,19 @@ int main(int argc, char* argv[])
+
+ drive = temp;
+ }
+- break;
+-#endif
++#else
++ strncpy(driveName, optarg, MAX_PATH);
++ driveName[MAX_PATH] = 0;
++#endif
++ break;
++ /* Log file */
++ case 'e':
++ pi.logfile=strdup(optarg);
++ break;
++ /* ignore files that already exist in output */
++ case 'i':
++ pi.flags|=OP_FLAG_IGNORE;
++ break;
+
+ /* list mode */
+ case 'l':
+@@ -193,17 +159,6 @@ int main(int argc, char* argv[])
+ #ifdef _WIN32
+ /* Under windows we format the drive number */
+ makeDriveName(driveName, drive);
+-
+-#else
+- /* Now when not under Windows, it's the drive name */
+- if(argc < 1)
+- errx(2, "must specify drive name");
+-
+- strncpy(driveName, argv[0], MAX_PATH);
+- driveName[MAX_PATH] = 0;
+-
+- argv++;
+- argc--;
+ #endif
+
+
+@@ -271,6 +226,36 @@ int main(int argc, char* argv[])
+
+ void usage()
+ {
+- fprintf(stderr, "%s", kPrintHelp);
++#ifdef _WIN32
++#define D_OPT "drive"
++#define D_DESC "Drive number"
++ fprintf(stderr,"\
++usage: scrounge-ntfs -l \n\
++ List all drive partition information. \n\
++ \n\
++usage: scrounge-ntfs [-d drive] -s \n\
++ Search drive for NTFS partitions. \n"
++#else /* Not WIN32 */
++#define D_OPT "disk"
++#define D_DESC "The raw disk partitios (ie: /dev/hda)"
++ fprintf(stderr,"\
++usage: scrounge-ntfs -l -d disk \n\
++ List all drive partition information. \n\
++ \n\
++usage: scrounge-ntfs -s -d disk \n\
++ Search drive for NTFS partitions. \n"
++#endif
++"usage: scrounge-ntfs [-d %s] [-m mftoffset] [-c clustersize] [-o outdir] [-e errfile] [-i] start end \n\
++Scrounge data from a partition \n\
++ -d %s \n\
++ -m Offset to mft (in sectors) \n\
++ -c Cluster size (in sectors, default of 8) \n\
++ -l List sectors/MFT \n\
++ -o Directory to put scrounged files in \n\
++ -i Ignore files that exist in output \n\
++ start First sector of partition \n\
++ end Last sector of partition \n\
++ \n\
++",D_OPT,D_DESC);
+ exit(2);
+ }
+Index: scrounge-ntfs-0.9/src/scrounge.c
+===================================================================
+--- scrounge-ntfs-0.9.orig/src/scrounge.c
++++ scrounge-ntfs-0.9/src/scrounge.c
+@@ -202,8 +202,7 @@ void processMFTRecord(partitioninfo* pi,
+ }
+ }
+
+- printf(flags & PROCESS_MFT_FLAG_SUB ?
+- "\\" FC_PRINTF : "\\" FC_PRINTF "\n", basics.filename);
+++ printf("\\" FC_PRINTF,basics.filename);
+
+ /* Directory handling: */
+ if(header->flags & kNTFS_RecFlagDir)
+@@ -251,6 +250,13 @@ void processMFTRecord(partitioninfo* pi,
+ else
+ #endif
+ {
++ if(pi->flags & OP_FLAG_IGNORE){
++ struct stat buf;
++ if(stat(basics.filename,&buf) == 0) {/* if the file exists, just ignore it */
++ printf(" - Already exists, Not duplicating.\n");
++ goto cleanup;
++ } else printf("\n");
++ }
+ ofile = fc_open(basics.filename, O_BINARY | O_CREAT | O_EXCL | O_WRONLY, DEF_FILE_MODE);
+
+ fcsncpy(filename2, basics.filename, MAX_PATH);
diff --git a/debian/patches/series b/debian/patches/series
index a81401b..a54a423 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,6 @@
-01-man-page-link.patch
+01-fix-manpage
+02-fix-help-message
+03-fix-max-size
+
+# This patch was proposed via #789806. However, it didn't work.
+# 04-clean-code-add-option
diff --git a/debian/rules b/debian/rules
index 4e227ff..63844c9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,15 +1,6 @@
#!/usr/bin/make -f
-%:
- dh ${@} --with quilt
-
-override_dh_auto_clean:
- dh_auto_clean
-
- rm -f config.guess config.sub
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-override_dh_auto_configure:
- [ -r /usr/share/misc/config.guess ] && cp -f /usr/share/misc/config.guess config.guess
- [ -r /usr/share/misc/config.sub ] && cp -f /usr/share/misc/config.sub config.sub
-
- dh_auto_configure -- LDFLAGS="-Wl,-z,defs"
+%:
+ dh $@ --with autoreconf
diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides
deleted file mode 100644
index 82c431e..0000000
--- a/debian/source.lintian-overrides
+++ /dev/null
@@ -1,3 +0,0 @@
-# Avoid warnings if non-uploaders to uploads.
-scrounge-ntfs source: changelog-should-mention-nmu
-scrounge-ntfs source: source-nmu-has-incorrect-version-number
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
index d0ac3d9..0253a77 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,2 @@
version=3
-http://memberwebs.com/stef/software/scrounge/scrounge-ntfs-(.*)\.tar\.gz
+http://thewalter.net/stef/software/scrounge scrounge-ntfs-(\d\S+)\.(?:zip|tar\.(?:bz2|gz|xz))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/scrounge-ntfs.git
More information about the forensics-changes
mailing list