summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--Makefile.am2
-rw-r--r--configure.in4
-rw-r--r--src/Makefile.am2
-rw-r--r--src/posix.c5
-rw-r--r--src/scrounge.c12
6 files changed, 29 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index e69de29..9f6b339 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -0,0 +1,14 @@
+0.9
+ - Ported to Linux/FreeBSD
+ - Support for very fragmented MFTs
+ - Fixed memory leaks
+ - Fixed many bugs
+
+0.8
+ - Support for non-contiguous MFT
+ - Better support for WinXP NTFS
+ - Other bug fixes
+
+0.7
+ - Initial public release
+
diff --git a/Makefile.am b/Makefile.am
index ff52d9c..80a7f9a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
EXTRA_DIST = BUGS
-SUBDIRS = src win32
+SUBDIRS = src win32 doc
dist-hook:
rm -rf `find $(distdir)/ -name CVS`
diff --git a/configure.in b/configure.in
index 7dacd0e..c5c4abe 100644
--- a/configure.in
+++ b/configure.in
@@ -36,8 +36,8 @@ dnl Nate Nielsen <nielsen@memberwebs.com>
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(scrounge-ntfs, 0.8.1, nielsen@memberwebs.com)
-AM_INIT_AUTOMAKE(scrounge-ntfs, 0.8.1)
+AC_INIT(scrounge-ntfs, 0.8.5, nielsen@memberwebs.com)
+AM_INIT_AUTOMAKE(scrounge-ntfs, 0.8.5)
LDFLAGS="$LDFLAGS -L/usr/local/lib"
CFLAGS="$CFLAGS -I/usr/local/include"
diff --git a/src/Makefile.am b/src/Makefile.am
index be563f5..bf70535 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-bin_PROGRAMS = scrounge-ntfs
+sbin_PROGRAMS = scrounge-ntfs
scrounge_ntfs_SOURCES = compat.c compat.h debug.h drive.h list.c locks.h main.c memref.h \
misc.c ntfs.c ntfs.h ntfsx.h ntfsx.c posix.c scrounge.c scrounge.h \
diff --git a/src/posix.c b/src/posix.c
index 91bb43a..14a9a2d 100644
--- a/src/posix.c
+++ b/src/posix.c
@@ -94,7 +94,10 @@ void setFileAttributes(fchar_t* filename, uint32 flags)
}
else
{
- if(chmod(filename, st.st_mode & ~(S_IWUSR | S_IWGRP | S_IWOTH)) == -1)
+ st.st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
+ fprintf(stderr, "mode: %x", st.st_mode);
+
+ if(chmod(filename, st.st_mode) == -1)
warn("couldn't set file attributes for: " FC_PRINTF, encoded);
}
}
diff --git a/src/scrounge.c b/src/scrounge.c
index 45cd1bf..66b608e 100644
--- a/src/scrounge.c
+++ b/src/scrounge.c
@@ -24,6 +24,8 @@
#include "locks.h"
#define PROCESS_MFT_FLAG_SUB 1 << 1
+#define DEF_FILE_MODE 0x180
+#define DEF_DIR_MODE 0x1C0
typedef struct _filebasics
{
@@ -212,7 +214,7 @@ void processMFTRecord(partitioninfo* pi, uint64 sector, uint32 flags)
if(!g_verifyMode)
#endif
{
- if(fc_mkdir(basics.filename) == -1)
+ if(fc_mkdir(basics.filename, DEF_DIR_MODE) == -1)
{
warn("couldn't create directory '" FC_PRINTF "' putting files in parent directory", basics.filename);
}
@@ -244,7 +246,7 @@ void processMFTRecord(partitioninfo* pi, uint64 sector, uint32 flags)
else
#endif
{
- ofile = fc_open(basics.filename, O_BINARY | O_CREAT | O_EXCL | O_WRONLY);
+ ofile = fc_open(basics.filename, O_BINARY | O_CREAT | O_EXCL | O_WRONLY, DEF_FILE_MODE);
fcsncpy(filename2, basics.filename, MAX_PATH);
filename2[MAX_PATH] = 0;
@@ -263,7 +265,7 @@ void processMFTRecord(partitioninfo* pi, uint64 sector, uint32 flags)
itofc(rename, basics.filename + fcslen(basics.filename), 10);
rename++;
- ofile = fc_open(basics.filename, O_BINARY | O_CREAT | O_EXCL | O_WRONLY);
+ ofile = fc_open(basics.filename, O_BINARY | O_CREAT | O_EXCL | O_WRONLY, DEF_FILE_MODE);
}
if(ofile == -1)
@@ -559,8 +561,8 @@ void scroungeUsingMFT(partitioninfo* pi)
void scroungeUsingRaw(partitioninfo* pi)
{
- byte buffSec[kSectorSize];
- fchar_t dir[MAX_PATH + 1];
+ byte buffSec[kSectorSize];
+ fchar_t dir[MAX_PATH + 1];
uint64 sec;
drivelocks locks;
int64 pos;