OSDN Git Service
Jean-Pierre André [Thu, 22 May 2014 06:58:03 +0000 (08:58 +0200)]
Displayed the parent directory of selected files in usermap
Displaying the parent directory facilitates the identification of files
selected by usermap as a base for defining the mapping of Windows users
to Linux ones.
Jean-Pierre André [Thu, 22 May 2014 06:46:08 +0000 (08:46 +0200)]
Ignored chmod/chown/setfacl when Windows inheritance is applied
chmod/chown/setfacl can only define permissions according to Linux rules
with references to owner and group. Windows rules are more general and
propagated through inheritance, and chmod/chown/setfacl may create unwanted
deviations from these rules. Ignoring them prevents text editors from
creating such deviations when updating a file and creating a backup one.
Jean-Pierre André [Thu, 22 May 2014 06:36:41 +0000 (08:36 +0200)]
Allowed group mapping of a few well-known SIDs
Since Vista, Windows defines a /Users/Public directory supposed to be
public, but actually only allowed to a few user categories (interactive,
batch, etc.) This patch makes possible to create equivalent Unix groups
and group users the same way as in Windows. Posix ACLs have to be enabled
for access to /Users/Public to be allowed to several groups.
Jean-Pierre André [Wed, 23 Apr 2014 08:13:27 +0000 (10:13 +0200)]
Returned success from ntfsprogs utilities with options --version and --help
The ntfsprogs used to return failure when option --version or --help
was used, and this has triggered complains from distribution packagers
who use these options in packaging scripts.
With this patch, success is returned (same behavior as gcc).
Jean-Pierre André [Wed, 23 Apr 2014 07:53:13 +0000 (09:53 +0200)]
Fixed inserting a new ACL after they have been wiped out by chkdsk
chkdsk deletes the ACLs when they are bad or when they are not used any
more. This fixes inserting a new ACL after the previously last ACL (or
even all of them) was deleted.
Jean-Pierre André [Wed, 23 Apr 2014 07:47:21 +0000 (09:47 +0200)]
Fixed $Bitmap size in the root index in ntfsresize
When the partition is resized, the global bitmap size is adjusted accordingly,
however so far the new size was not set into the parent index (only minor
consequences).
Jean-Pierre André [Wed, 23 Apr 2014 07:43:43 +0000 (09:43 +0200)]
Fixed inclusion of <sys/param.h> for Solaris/OpenIndiana
The truncation of oversized file names on Solaris/OpenIndiana requires
the definition of the maximum size from <sys/param.h> instead of
<param.h>
Erik Larsson [Fri, 18 Apr 2014 09:54:54 +0000 (11:54 +0200)]
Fix readdir I/O error on file names larger than 255 bytes in Solaris.
If a readdir operation returned a file name larger than 255 bytes,
Solaris/Illumos would return I/O error from the readdir operation.
Fixed by truncating the file name returned in the readdir operation.
Chih-Wei Huang [Tue, 15 Apr 2014 08:23:07 +0000 (16:23 +0800)]
Fix a possible memory leak
In ntfs_fuse_parse_path(), it's possible that strdup() succeeds but
ntfs_mbstoucs() returns a negative value. In such a case the callers
just treat it as an error and ignores the allocated path buffer
that results in a memory leak.
Chih-Wei Huang [Tue, 15 Apr 2014 08:23:07 +0000 (16:23 +0800)]
Initialize 'path' correctly
It fixes the warnings
src/ntfs-3g.c: In function 'ntfs_fuse_readlink':
src/ntfs-3g.c:987:6: warning: 'path' may be used uninitialized in this function [-Wmaybe-uninitialized]
src/ntfs-3g.c: In function 'ntfs_fuse_create':
src/ntfs-3g.c:1765:6: warning: 'path' may be used uninitialized in this function [-Wmaybe-uninitialized]
Jean-Pierre André [Sat, 12 Apr 2014 07:32:59 +0000 (09:32 +0200)]
Mapped the runlist when filling an initial hole
A bug was introduced by commit
d2c7d40a2b494f9bf355c8bbe78c24fa16925f86 :
when the beginning of a file was a hole and the runlist span over several
MFT extents, the runlist was not mapped on filling the initial hole.
This lead to a crash when using torrent to download big files.
Jean-Pierre André [Sat, 12 Apr 2014 07:27:27 +0000 (09:27 +0200)]
Added a license section to the README file
Explained the licensing differences between fuse-lite and ntfs-3g proper.
Jean-Pierre André [Sat, 12 Apr 2014 07:22:17 +0000 (09:22 +0200)]
Implemented an extended attribute to get/set EAs
The new extended attribute "system.ntfs_ea" can now be used to get or
set the set of EAs of a file or directory.
Jean-Pierre André [Sat, 12 Apr 2014 07:14:08 +0000 (09:14 +0200)]
Fixed ioctl() error return for ntfsclone on Windows
The ioctl() function is not implemented in the Windows variant. By forcing
a negative apparent return, an alternative is triggered to get the
partition size which is normally obtained from an ioctl().
Jean-Pierre André [Tue, 11 Mar 2014 10:15:59 +0000 (11:15 +0100)]
Switched to the relocated bitmap for delayed relocations in ntfsresize
In some rare situations relocated runlists are longer than the original
ones and do not fit into the same extent. When this happens the runlist
updating is delayed and done globally. Be sure to use the updated global
bitmap for making the needed allocations.
Jean-Pierre André [Tue, 11 Mar 2014 10:10:33 +0000 (11:10 +0100)]
Implemented updating an encrypted file in ntfsdecrypt
Existing encrypted files can be updated provided the encryption method
and key can be extracted from the LOGGED_UTILITY_STREAM attribute.
Jean-Pierre André [Tue, 11 Mar 2014 10:06:21 +0000 (11:06 +0100)]
Accepted encryption keys whose EFS purpose is not the first one
X509 certificates have a purpose field restricting what the certificate
can be used for, and EFS encryption is such a purpose. Allow EFS encryption
to be at any position in the list.
Jean-Pierre André [Tue, 11 Mar 2014 10:03:06 +0000 (11:03 +0100)]
Fixed checking whether utimensat() applies to current atime
The check was applied to mtime instead of atime
Jean-Pierre André [Tue, 11 Mar 2014 09:56:31 +0000 (10:56 +0100)]
Rejected reserved files names when option windows_names is set
Windows applies legacy restrictions to file names, so when the option
windows_names is applied, reject the same reserved names, which are
CON, PRN, AUX, NUL, COM1..COM9, and LPT1..LPT9
Jean-Pierre André [Tue, 11 Mar 2014 09:51:47 +0000 (10:51 +0100)]
Added a summary of inodes found by ntfscluster
Output the number of inodes found.
Jean-Pierre André [Tue, 11 Mar 2014 09:47:48 +0000 (10:47 +0100)]
Improved the warning for analyzing an extent in ntfscluster
When analyzing an extent in ntfscluster, mention its base record
Jean-Pierre André [Tue, 11 Mar 2014 09:43:31 +0000 (10:43 +0100)]
Fixed endianness bugs in ntfscluster
ntfscluster was not suitable for big-endian CPUs
Jean-Pierre André [Tue, 11 Mar 2014 09:37:27 +0000 (10:37 +0100)]
Fixed displaying the correct sector number in error message
When opening a volume, the availability of the last sector is checked,
but the error message mentioned a wrong sector.
Jean-Pierre André [Tue, 11 Mar 2014 09:32:39 +0000 (10:32 +0100)]
Fixed marking device as closed (Windows variant)
When closing a device, the flag keeping track of open state was not reset,
and this prevented opening again (native Windows variant only).
Jean-Pierre André [Tue, 11 Mar 2014 09:28:02 +0000 (10:28 +0100)]
Updated ctime after setting an ACL
When setting a Posix ACL, the ctime was not updated to match ext2/ext3
behavior. This ext2/ext3 behavior has been changed, so do the same.
Jean-Pierre André [Tue, 11 Mar 2014 09:16:26 +0000 (10:16 +0100)]
Used MFT record 15 for the first extent to MFT:DATA
When the runlist of the data attribute of MFT has to be split across
several extents, the location of each extent has to be known from the
runlist present in previous extents. So, force the first extent into
record 15 to avoid a bad layout.
Jean-Pierre André [Tue, 11 Mar 2014 09:11:00 +0000 (10:11 +0100)]
Traced dirtying runlists and updated them accordingly
Use a new flag to trace changes to a runlist and avoid recomputing the
runlist when no actual change occurred.
Jean-Pierre André [Tue, 11 Mar 2014 09:04:54 +0000 (10:04 +0100)]
Avoided full runlist updating in more situations
When a hole in a sparse file was filled, the runlist was fully recomputed.
When a sparse file spans over several MFT extents, this patch leads to
only recompute the runlist from the modified extent to the end.
Jean-Pierre André [Tue, 11 Mar 2014 08:54:53 +0000 (09:54 +0100)]
Reset the output file to favour appending to image in ntfsclone
When ntfsclone'ing to a file, the target file was truncated to the volume
size. This is not useful on file systems which support sparse files. In
the case of ntfs-3g this leads to prevent optimizations specific to
appending data. So when a sparse output file is detected, it is emptied
to benefit from subsequent appending of data.
Jean-Pierre André [Tue, 11 Mar 2014 08:50:02 +0000 (09:50 +0100)]
Avoided double opening of parent directory name in ntfscp
Double openings of a file or directory lead to double memory copies and
may lead to inconsistencies. On such situation could occur in ntfscp.
Jean-Pierre André [Tue, 11 Mar 2014 08:44:50 +0000 (09:44 +0100)]
Avoided unnormalized parent directory name in ntfscp
Avoid leading '/' in directory names and use in ntfscp the same rule as fuse.
Jean-Pierre André [Tue, 11 Mar 2014 08:40:18 +0000 (09:40 +0100)]
Fixed default option for compression in the manual
Mention in the manual that compression is now enabledd by default.
Jean-Pierre André [Tue, 11 Mar 2014 08:35:50 +0000 (09:35 +0100)]
Fixed an erroneous reference to compression in the manual
compression was erroneously mentioned in the manual instead of permission.
Jean-Pierre André [Tue, 11 Mar 2014 08:30:18 +0000 (09:30 +0100)]
Improved the description of the silent option in the manual
The silent option acts on chown and chown, but also on permission checking,
and when the option is disabled, permission checking errors may emerge.
Jean-Pierre André [Tue, 11 Mar 2014 08:24:34 +0000 (09:24 +0100)]
Added option --min-fragments to reduce fragmentation in ntfscp
When copying a file through ntfscp, the file size is known, hence the
space allocation can be optimized to get minimal fragmentation.
Jean-Pierre André [Tue, 11 Mar 2014 08:19:06 +0000 (09:19 +0100)]
Avoided displaying sync errors in ntfscp with --no-action
Do not loop on displaying errors when nothing is to be done
Jean-Pierre André [Tue, 11 Mar 2014 08:12:41 +0000 (09:12 +0100)]
Fixed an endianness error in ntfsundelete
Name matching was wrong on big endian CPUs when not using regex
Jean-Pierre André [Tue, 11 Mar 2014 08:07:59 +0000 (09:07 +0100)]
Allowed setting the serial number to 0x8000000000000000 or greater
The serial number of an ntfs volume should be processed as an unsigned
number (fix by E. Talsma)
Jean-Pierre André [Sun, 16 Feb 2014 20:16:09 +0000 (21:16 +0100)]
Updated the references to changelog and source repository
References now set to Tuxera and git repository
Jean-Pierre André [Sun, 16 Feb 2014 17:25:09 +0000 (18:25 +0100)]
Updated copyright claims
Szabolcs Szakacsits [Sat, 15 Feb 2014 14:01:40 +0000 (16:01 +0200)]
Version 2014.2.15
Jean-Pierre André [Mon, 13 Jan 2014 14:21:51 +0000 (15:21 +0100)]
Made ntfsdecrypt compatible with libgrypt-1.6
The upcoming libgrypt-1.6 drops the "module" interface which was used
by ntfsdecrypt for decrypting files which were encrypted with the "DESX"
algorithm. This algorithm is a Microsoft variant of DES with a key size
of 128 bits, and is not natively supported by libgrypt. The module interface
made possible to declare an external algorithm so that all the encryption
modes could be processed the same way whether the algorithm was internal
or external.
This patch makes DESX a specific case, so that the module interface is
not needed any more. It is compatible with current libgrypt and upcoming
libgrypt-1.6
Jean-Pierre André [Tue, 17 Dec 2013 09:39:55 +0000 (10:39 +0100)]
Ignored unmapped regions when checking whether sparse
Updating an attribute may imply decompressing runlists which are not
contiguous, leaving an unmapped region between them. When checking whether
the attribute has been made sparse, such unmapped regions should be ignored
This mostly happens after updating an index. (fix by Forrest Liu)
Jean-Pierre André [Fri, 20 Sep 2013 14:20:02 +0000 (16:20 +0200)]
Logged more details when an attribute is not found
Log the inode number and attribute type when an attribute is not found.
This simplifies identifying relevant ones among such log messages.
Jean-Pierre André [Fri, 20 Sep 2013 14:14:55 +0000 (16:14 +0200)]
Allowed DACLs to to not have any ACE
Windows server 2012 apparently uses files with no ACEs in their DACL,
thus denying any access to any process except system backup.
Such DACLs should however be considered valid.
Jean-Pierre André [Mon, 9 Sep 2013 17:46:00 +0000 (19:46 +0200)]
Fixed memory leak while comparing attributes with bad sectors
When bad sectors were found when comparing attributes, the attribute
descriptors were not closed and freed (fixed by Rakesh Pandit)
Jean-Pierre André [Mon, 9 Sep 2013 13:39:45 +0000 (15:39 +0200)]
Silenced warnings by gcc >= 4.8 about non-checked return values
Added tests on the value returned by setuid() to avoid warnings by
gcc >= 4.8
Jean-Pierre André [Mon, 9 Sep 2013 13:34:14 +0000 (15:34 +0200)]
Silenced warnings by gcc >= 4.8 about aliasing
Added intermediate variables to avoid warnings by gcc >= 4.8
Jean-Pierre André [Mon, 9 Sep 2013 13:27:38 +0000 (15:27 +0200)]
Fixed expanding a resident attribute without inserting holes
When calling ntfstruncate() to expand a resident attribute, the function
is called again recursively, losing the requirement for not inserting
holes. This is for forwarding the requirement (used by ntfscp).
Jean-Pierre André [Mon, 9 Sep 2013 13:19:50 +0000 (15:19 +0200)]
Fixed testing whether a stream has been wiped out
When testing whether a stream has been wiped out for possibly changing
its compression status, only the non-resident case was considered.
This fixes the test for streams which were never made non-resident.
Jean-Pierre André [Tue, 6 Aug 2013 09:44:40 +0000 (11:44 +0200)]
Fixed creating a new image file on Windows
Creating a new image file (clone or metadata) by ntfsclone failed on
Windows, because the file was not opened with the needed flags.
Jean-Pierre André [Tue, 6 Aug 2013 09:39:13 +0000 (11:39 +0200)]
Fixed dealing with errors getting the file size from Windows
Using SetFilePointer() for compatibility with old Windows implies
a specific management of errors....
Jean-Pierre André [Tue, 30 Jul 2013 09:42:59 +0000 (11:42 +0200)]
Fixed computing a file size on Windows
The lower part should not have been sign-extended.
Jean-Pierre André [Tue, 30 Jul 2013 09:31:56 +0000 (11:31 +0200)]
Fixed struct formats for running on 64-bit Windows
Added a few paddings for field alignment in structs whose layout has to
match 64-bit Windows internals.
Jean-Pierre André [Tue, 30 Jul 2013 09:27:16 +0000 (11:27 +0200)]
Fixed format translations for Windows
Translating "%ll" print formats to "%I64" for Windows was wrong.
Jean-Pierre André [Tue, 30 Jul 2013 09:22:34 +0000 (11:22 +0200)]
Removed duplicated code in mkntfs
Removed a meaningless duplicated test.
Jean-Pierre André [Tue, 30 Jul 2013 09:17:29 +0000 (11:17 +0200)]
Improved emulation of stat(2) on Windows
Made a distinction between a file and a partition when emulating stat(2)
on Windows (useful for ntfsclone).
Jean-Pierre André [Tue, 30 Jul 2013 09:13:51 +0000 (11:13 +0200)]
Silenced a compiler warning in ntfs-3g.probe
Avoid some compilers to complain about a missing return value...
Jean-Pierre André [Tue, 30 Jul 2013 09:07:12 +0000 (11:07 +0200)]
Forced 64-bit computation of inode number in ntfsundelete
An inode number computation was done with 32 bits, and could (theoretically)
lead to truncation.
Jean-Pierre André [Tue, 30 Jul 2013 09:00:46 +0000 (11:00 +0200)]
Output the modification time when scanning files by ntfsundelete
When trying to undelete a file which was modified several times the
same day, it is difficult to tell which one is the latest unless the
modification time is displayed.
Jean-Pierre André [Tue, 30 Jul 2013 08:53:07 +0000 (10:53 +0200)]
Fixed delayed deletion of files opened multiple times in lowntfs-3g
Reworked the delayed deletion of open files in lowntfs-3g to cope with
situations where a file was opened multiple times. In such circumstances,
multiple ghost names are created, to avoid having to check the full list
when opening and closing, which are much more frequent than deleting.
Jean-Pierre André [Tue, 30 Jul 2013 08:45:22 +0000 (10:45 +0200)]
Improved the manual description of the size option of ntfsresize
Tried to make clear an NTFS file system size is smaller than the
partition size, and the size wanted by ntfsresize is the partition
size.
Jean-Pierre André [Tue, 30 Jul 2013 08:35:13 +0000 (10:35 +0200)]
Reserved a single sector for the backup boot sector
Reserve a single sector, instead of a full cluster, for the backup boot
sector.
Jean-Pierre André [Tue, 30 Jul 2013 08:17:28 +0000 (10:17 +0200)]
Set the backup boot sector in ntfsresize when the size is reliable
Traditionally the backup boot sector is not set by ntfsresize because
the exact partition size is not yet known. A chkdsk is triggered to
subsequently insert it.
However ntfsresize is frequently activated by a partition editor which
has an exact knowledge of the wanted layout, and the backup boot sector
can be inserted by ntfsresize. This is only done if the target partition
size is defined with no unit suffix, and it is a multiple of the sector
size. Anyway the backup boot sector cannot overwrite useful data as it
is inserted between the file system size and the target partition size.
Jean-Pierre André [Thu, 30 May 2013 08:23:04 +0000 (10:23 +0200)]
Fixed processing compressed data beyond file size
Windows 8 does not zero any more the end of a compression block beyond
what is needed to reach the end of a file. We must now be careful not
to decompress more data than needed.
Jean-Pierre André [Tue, 7 May 2013 09:42:48 +0000 (11:42 +0200)]
Fixed size truncation when checking for Interix types on 32-bit CPU
A cast, intended to avoid comparing signed to unsigned, led to truncate
the size on a 32-bit CPU, hence to wrongly check for Interix types.
Jean-Pierre André [Fri, 26 Apr 2013 17:07:47 +0000 (19:07 +0200)]
Fixed the reversing of slashes in relative Windows-type symlinks
When translating Windows-type symlinks to Linux ones, the directory
separator has to be changed from '\' to '/'. The change was wrong
for multiple "..\" and ".\"
Jean-Pierre André [Mon, 22 Apr 2013 17:14:48 +0000 (19:14 +0200)]
Fixed usa checking by ntfsck on 4K sectors
The usa sequence is used to make sure the sectors containing metadata
are fully written. The values are always put at the end of 512-byte
chunks even if the sectors are greater.
Jean-Pierre André [Mon, 22 Apr 2013 17:06:49 +0000 (19:06 +0200)]
Removed obsoleted references to utime_omit_ok
When issuing an utimensat as a consequence of utime(2) or utimensat(2),
fuse had temporarily defined a flag utime_omit_ok to identify whether
the file system supports the values UTIME_OMIT and UTIME_NOW to mean
specific timestamp updatings. The flag has been obsoleted and all
file system are now supposed to comply with the convention.
Jean-Pierre André [Mon, 22 Apr 2013 16:55:26 +0000 (18:55 +0200)]
Fixed updating all the MFT runs in a relocated MFT in ntfsresize
When the MFT is partially located beyond the end of a resized partition,
it has to be relocated after the other files have been processed
because the MFT data is needed to do the relocations. When the MFT runlist
is split over extents, all of them have to be processed.
Jean-Pierre André [Mon, 22 Apr 2013 16:45:48 +0000 (18:45 +0200)]
Fixed trying to update the MFT and Bitmap on a test run of ntfsresize
When the beginning of the MFT is beyond the end of the resized
partition, a specific procedure has to be used to relocate this part
of the MFT and adjust the bitmap accordingly. On a test run, these
updates should not be done.
Jean-Pierre André [Mon, 22 Apr 2013 16:37:51 +0000 (18:37 +0200)]
Used /proc/mounts for checking existing mounts
The file /etc/mtab is traditionally checked to avoid multiple mountings
of the same device, but this is not accurate enough in some conditions.
So use /proc/mounts when available and fall back to /etc/mtab on
systems which do not have /proc/mounts.
Jean-Pierre André [Mon, 22 Apr 2013 16:31:16 +0000 (18:31 +0200)]
Increased the maximum format size on Windows
The long long printing formats (such as %lld or %llx) have to be
translated to %I64 on older Windows systems, and the buffers to
receive the translated format must be able to hold the tool banners
which can be quite lengthy.
Jean-Pierre André [Wed, 13 Feb 2013 07:54:34 +0000 (08:54 +0100)]
Fixed a use of uninitialized variable compiler warning
Author: Anton Altaparmakov
Date: Wed Feb 13 02:29:47 2013 +0000
This is a fix to the use of hd library to get the legacy BIOS geometry.
Jean-Pierre André [Wed, 13 Feb 2013 07:51:47 +0000 (08:51 +0100)]
Made compilation with --enable-really-static option to ./configure work
Author: Anton Altaparmakov
Date: Wed Feb 13 02:29:47 2013 +0000
This is a fix to the use of hd library to get the legacy BIOS geometry.
Jean-Pierre André [Tue, 12 Feb 2013 14:45:54 +0000 (15:45 +0100)]
Added use of hd library to get the legacy BIOS geometry
Author: Anton Altaparmakov <anton@tuxera.com>
Date: Tue Feb 12 10:33:55 2013 +0000
Modify libntfs-3g to make use of hd library to get the legacy BIOS geometry
from EDD. We scan all whole disk devices on the system and check if they
match the open ntfs device and if not we scan all partition devices on the
system and check if they match the open ntfs device.
If we find a partition device to match then we find its parent device again
using the hd library.
Once we have the parent of the partition device or we matched a whole disk
device we get the legacy EDD sectors per track and heads again using the hd
library.
Use of the hd library is auto detected (based on finding <hd.h> header file,
being able to link against libhd and finding the hd_list symbol in libhd.
Use can also be disabled/enabled/libhd prefix specified at ./configure time.
See ./configure --help for details.
Note this obviously requires libhd to be installed. On Ubuntu 12/04 systems
the relevant packages needed are libhd-dev and libhd16 (on older Ubuntu
versions it will be libhdN where N is some number <= 16 but an easy way to
get the right package is to simply install libhd-dev which by dependency
pulls in the correct libhdN package) whilst on SLES systems the relevant
packages needed are hwinfo and hwinfo-devel.
Jean-Pierre André [Sat, 9 Feb 2013 14:19:34 +0000 (15:19 +0100)]
Made the meaning of the size argument of ntfsresize more clear in the manual
The size argument of ntfsresize is the target partition size. This is
not the file system size as returned by df(1) or statvfs(3) because a
sector is reserved for the backup boot sector, and the remaining sector
count might not be a multiple of clusters per sector.
Jean-Pierre André [Sat, 9 Feb 2013 14:12:56 +0000 (15:12 +0100)]
Initialize the random generator for the internal guid generator
When uuid/uuid.h is not available, mkntfs uses a home-made guid
generator. Better initialize the random generator to get a random guid.
Jean-Pierre André [Sat, 9 Feb 2013 14:07:06 +0000 (15:07 +0100)]
Fixed rescuing clusters by physical sectors in ntfsclone
When a sector is unreadable, consider the whole sector as bad, instead
of trying to find which 512-byte parts of it are bad. This was causing
unwanted retries for devices with 4K sectors.
Jean-Pierre André [Sat, 9 Feb 2013 14:04:41 +0000 (15:04 +0100)]
Fixed setting a magic header to unreadable sectors in ntfsclone
The magic header of an unreadable sectors should have the size of
"BadSectoR", not the size of a pointer to it.
Jean-Pierre André [Sat, 9 Feb 2013 14:01:36 +0000 (15:01 +0100)]
Rejected reading a volume from stdin in ntfsclone
Reading a volume must be done in a seekable way. Better throw a proper
error.
Jean-Pierre André [Sat, 9 Feb 2013 13:56:46 +0000 (14:56 +0100)]
Ported ntfsundelete to Windows
Made a few adaptations to what is available on Windows.
Jean-Pierre André [Sat, 9 Feb 2013 11:57:22 +0000 (12:57 +0100)]
Translated %ll print editing formats to %I64 on Windows
Older msvcrt.dll (on XP and earlier) did not support "%ll" print editing
formats frequently used by ntfsclone. So translate them to "%I64" when
running on Windows. This format appears to be supported by all Windows
versions. Error messages from libntfs-3g are still not translated.
Jean-Pierre André [Sat, 9 Feb 2013 11:54:44 +0000 (12:54 +0100)]
Ported ntfsclone to Windows
This mainly means using the functions in win32_io.c instead of the
standard msvcrt.dll ones in order to be able to truncate files and
create sparse ones.
Jean-Pierre André [Sat, 9 Feb 2013 11:53:38 +0000 (12:53 +0100)]
Fixed bad copying of the backup boot sector in ntfsclone
This patch fixes the sector offset to the backup boot sector when creating
a metadata image.
Jean-Pierre André [Sat, 9 Feb 2013 11:50:16 +0000 (12:50 +0100)]
Revert "Ported ntfsclone to Windows", should be "Fixed bad copying of the backup boot sector"
This reverts commit
92cd41b6e5b3dd755065d345a8f2c44db7b5ce48.
The title and description were wrong
Jean-Pierre André [Sat, 9 Feb 2013 11:14:19 +0000 (12:14 +0100)]
Ported ntfsclone to Windows
This mainly means using the functions in win32_io.c instead of the
standard msvcrt.dll ones in order to be able to truncate files and
create sparse ones.
Jean-Pierre André [Sat, 9 Feb 2013 11:12:02 +0000 (12:12 +0100)]
Cleaned selecting stdout or stderr for messages from ntfsclone
Depending on the options selected, ntfsclone messages are output on
stdout or stderr. This is now done through standard logging procedures.
Jean-Pierre André [Sat, 9 Feb 2013 11:08:58 +0000 (12:08 +0100)]
Avoided displaying in non-verbose mode information which is not computed
The summary of 'runcount.runs' and 'runcount.fragments' was displayed in
non-verbose mode. However these variables are not updated in non-verbose
mode, so they would always be 0.
We now only display this summary in verbose mode.
Jean-Pierre André [Sat, 9 Feb 2013 11:00:02 +0000 (12:00 +0100)]
Enabled relocating the MFT when shrinking a volume
This patch makes it possible to shrink a volume to a small size such that
the existing $MFT is beyond the new size.
Jean-Pierre André [Sat, 9 Feb 2013 10:56:09 +0000 (11:56 +0100)]
Made possible to run ntfsundelete on systems with no regex.h
The filtering of files to undelete is usually done through the regex
library. This patch offers an alternate way when such a library is
not readily available (typically on Windows).
Jean-Pierre André [Sat, 9 Feb 2013 10:51:40 +0000 (11:51 +0100)]
Avoided meaningless errors logging during ntfsundelete scans
When ntfsundelete scans the $MFT for possible deleted files, it may
examine extries which have never been used, producing error messages
which most users do not understand. This patch silences such messages.
Jean-Pierre André [Sat, 9 Feb 2013 10:48:54 +0000 (11:48 +0100)]
Cosmetic : use symbolic names for ntfsclone control codes
Defining symbolic names makes it easier to identify where they are used.
Jean-Pierre André [Sat, 9 Feb 2013 10:41:39 +0000 (11:41 +0100)]
Allowed cloning a file system despite allocation errors
Allow the "--ignore-fs-check" option to be used when cloning a file system
which has allocation errors. This is useful when there is a fear that
repairing the file system might create further damage, or when the repair
has to be made on another computer.
Jean-Pierre André [Sat, 9 Feb 2013 10:37:31 +0000 (11:37 +0100)]
Added a display of the location of an inconsistency in an image
When an ntfsclone image appears to be corrupted, show at which position
the error happens. This is useful for providing support.
Jean-Pierre André [Sat, 9 Feb 2013 10:33:17 +0000 (11:33 +0100)]
Fixed the ntfsfix option for testing in the manual
The option for checking the behavior of ntfsfix without writing anything
is "--no-action", not "--do-nothing".
Jean-Pierre André [Sat, 9 Feb 2013 10:29:21 +0000 (11:29 +0100)]
Added a new option for testing the consistency of an ntfsclone image
This patch adds a new option -n to ntfsclone for simulating a restore
without writing anything. This is useful for checking the consistency
of an image without destroying the original partition.
Jean-Pierre André [Sat, 9 Feb 2013 10:22:41 +0000 (11:22 +0100)]
Upgraded the Win32 interface for use with ntfsprogs
Upgrade the Win32 interface (win32_io.c) which was designed for Cygwin
so that it can be used for using the ntfsprogs utilities on native Windows.
Two new entries are added for truncating a file and creating a sparse
file, both of which not being supported through msvcrt.dll.
Jean-Pierre André [Sat, 9 Feb 2013 10:12:45 +0000 (11:12 +0100)]
Fixed wiping fragmented metadata when creating a metadata image
When creating a metadata image, all user data is supposed to be wiped off,
but this was wrong for $MFT and directory indexes when they were
fragmented. This patch cleans the tails of metadata fragments.
Jean-Pierre André [Sat, 9 Feb 2013 10:06:39 +0000 (11:06 +0100)]
Added directions for getting a user mapping proposal through secaudit
The definition of the user mapping needed to interoperate permissions
with Windows is too complex for most users. Even the "usermap" utility
is too complex. This patch adds explanations for using the "-u" option
of secaudit to get a user mapping proposal