OSDN Git Service
Jean-Pierre André [Fri, 11 Aug 2017 07:52:54 +0000 (09:52 +0200)]
Decoded more reparse tags in ntfsinfo
Displayed some information in ntfsinfo output about a few new types of
reparse point brought by Windows 10.
Jean-Pierre André [Fri, 11 Aug 2017 07:42:37 +0000 (09:42 +0200)]
Enabled directory operations in plugins
Windows 10 brought a new type of reparse point for directories (0x80000018),
so add opendir() and readdir() to the plugin interface to take directories
into account. The interface for releasedir() is merged with release() as
the plugins can discriminate them if needed.
Jean-Pierre André [Fri, 11 Aug 2017 07:34:31 +0000 (09:34 +0200)]
Relaxed limitations on security descriptors
Windows 10 brought security descriptors which contain ACE's related to
new ways of accessing files or directories. These ACE are now accepted
with minimal consistency checks. They are still ignored for translating
permissions and for Windows-type inheritance.
Jean-Pierre André [Fri, 11 Aug 2017 07:29:52 +0000 (09:29 +0200)]
Fixed a typo
A typo made a directive for plugin developers difficult to understand
Jean-Pierre André [Tue, 20 Jun 2017 06:56:00 +0000 (08:56 +0200)]
Fixed updating the vcn of subtree in ntfsrecover
The logic for determining where the actions SetIndexEntryVcnRoot and
SetIndexEntryVcnAllocation had to insert a new vcn was unclear and was
wrong in some situations. This is to fix the logic as determined by new
evidence.
Jean-Pierre André [Tue, 20 Jun 2017 06:51:09 +0000 (08:51 +0200)]
Mentioned ntfsfallocate and ntfsrecover in the general ntfsprogs manual
The most recent ntfsprogs utilities should be referenced in the table of
contents.
Jean-Pierre André [Thu, 25 May 2017 08:52:54 +0000 (10:52 +0200)]
Fixed the computation of highest_vcn when applying a runlist fixup
When a file is partially truncated, the highest_vcn has to be recomputed
before the file size is adjusted. As a consequence the unmapped run
inserted at the end of runlist to match the file size should not be taken
into account when determining the higest_vcn.
Jean-Pierre André [Thu, 25 May 2017 08:44:18 +0000 (10:44 +0200)]
Upgraded ntfsrecover to support log files 2.0
When the fast restart mode of Windows 8 (or later) is activated, the
log file format is different (version 2.0 instead of 1.1), having 32
temporaty blocks instead of 2. This patch upgrades ntfsrecover to take
the new format into account.
Jean-Pierre André [Thu, 25 May 2017 08:28:05 +0000 (10:28 +0200)]
Bypassed cluster allocation errors using --ignore-fs-check in ntfsclone
When using option --ignore-fs-check in ntfsclone, doubly allocated cluster
still lead to aborting the process. Bypassing the error is useful for
creating a metadata image intended for debugging, for example when the
partition was not closed properly and the logfile has to be applied to
restore the integrity of metadata.
Jean-Pierre André [Thu, 23 Mar 2017 09:39:59 +0000 (10:39 +0100)]
Version 2017.3.23
Jean-Pierre André [Wed, 22 Mar 2017 16:49:40 +0000 (17:49 +0100)]
Fixed computing the replacement bytes in ntfswipe
The computing of replacement bytes for overwriting undeletable files
uses random values and standard ones instead of the values provided in
option --bytes. Fix the mixup between both logics, mention the difference
in the documentation and reject defining both options --bytes and --undel.
Erik Larsson [Tue, 21 Mar 2017 11:06:04 +0000 (12:06 +0100)]
ntfsusermap.c: Fix warning about implicit conversion between enums.
Erik Larsson [Tue, 21 Mar 2017 10:58:30 +0000 (11:58 +0100)]
Fix bad native->little endian byteswap of little endian value.
Erik Larsson [Tue, 21 Mar 2017 10:55:41 +0000 (11:55 +0100)]
Use signed endian conversion macros for signed little-endian members.
Jean-Pierre André [Sat, 18 Mar 2017 14:42:00 +0000 (15:42 +0100)]
Removed the loader from boot image
The license for using the boot loader which used to be inserted by mkntfs
is unclear, so remove it, and only keep the boot sector restricted to
what is needed for having it recognized as such. The space for a loader
is still reserved so that an operating system being installed can insert
its own loader.
Jean-Pierre André [Wed, 15 Feb 2017 16:04:57 +0000 (17:04 +0100)]
Version 2017.2.15
Jean-Pierre André [Sat, 11 Feb 2017 10:03:02 +0000 (11:03 +0100)]
Loaded the fuse kernel module with no environment
Avoided leaking the current environment when loading the fuse kernel
module
Jean-Pierre André [Sat, 11 Feb 2017 09:58:46 +0000 (10:58 +0100)]
Fixed expanding $STANDARD_INFORMATION with almost-full MFT record
When setting a security descriptor on an NTFS v1.2 format file in an
NTFS v3.0+ volume, NTFS-3G would migrate $STANDARD_INFORMATION to the
new format, which requires extending its size from 48 to 72 bytes. If
this happened while the file's MFT record was almost full, and none of
the file's attributes could be made non-resident, and the file did not
have an attribute list attribute, then the operation would unexpectedly
fail with ENOENT. Fix this by adding an attribute list to the file in
this situation.
(contributed by Eric Biggers)
Jean-Pierre André [Sat, 11 Feb 2017 09:54:51 +0000 (10:54 +0100)]
Allowed names with trailing dot or space on conditions
Windows places filenames with a trailing dot or space in the Win32
namespace and allows setting DOS names on such files. This is true even
though on Windows such filenames can only be created and accessed using
WinNT-style paths and will confuse most Windows software. Regardless,
because libntfs-3g did not allow setting DOS names on such files, in
some cases it was impossible to correctly restore, using libntfs-3g, a
directory structure that was created under Windows.
Update ntfs_set_ntfs_dos_name() to permit operating on a file that has a
long name with a trailing dot or space. But continue to forbid creating
such names on a filesystem FUSE-mounted with the windows_name option.
Additionally, continue to forbid a trailing a dot or space in DOS names;
this matches the Windows behavior.
(contributed by Eric Biggers)
Jean-Pierre André [Sat, 11 Feb 2017 09:44:02 +0000 (10:44 +0100)]
Fixed setting opening contexts for plugins
The opening context was incorrectly passed to plugins by lowntfs-3g
(contributed by Eric Biggers)
Jean-Pierre André [Sat, 11 Feb 2017 09:37:47 +0000 (10:37 +0100)]
Accepted displaying bad security descriptors on conditions
Display security descriptors in ntfssecaudit when they appear as
correctly formed, even when they contain unsupported items.
Jean-Pierre André [Sat, 11 Feb 2017 09:29:39 +0000 (10:29 +0100)]
Fixed memory leak when failing to lookup an index
When an index could not be used, the search context was not freed
Jean-Pierre André [Sat, 11 Feb 2017 09:21:07 +0000 (10:21 +0100)]
Got ready for Posix ACL support in fuse kernel
Following a recent patch to the fuse kernel, the Posix ACL checks can
be done within the kernel instead of having to be done in the file
system, provided lowntfs-3g is used.
This mode is still not used by default until the fuse patch is
released by distributions.
Jean-Pierre André [Sat, 11 Feb 2017 09:11:01 +0000 (10:11 +0100)]
Removed unused argument from ntfs_make_symlink()
Now that the size of the reparse point attribute is no longer used by
the FUSE drivers to populate st_size for symlinks and junctions, it no
longer needs to be returned by ntfs_make_symlink().
(contributed by Eric Biggers)
Jean-Pierre André [Sat, 11 Feb 2017 09:04:15 +0000 (10:04 +0100)]
Returned the size of locale encoded target as the size of symlinks
Made ntfs-3f conform to the standard POSIX convention of setting st_size
to the length of the symlink target without a terminating null.
(contributed by Eric Biggers)
Jean-Pierre André [Sat, 11 Feb 2017 09:00:34 +0000 (10:00 +0100)]
Validated minimum size of mountpoint/symlink reparse points
valid_reparse_data() would read past the end of the reparse point buffer
if it was passed a malformed reparse point that had the tag for a
mountpoint or a symlink but had a data buffer smaller than expected.
Fix this by validating the buffer size.
(contributed by Eric Biggers)
Jean-Pierre André [Sat, 11 Feb 2017 08:58:30 +0000 (09:58 +0100)]
Eliminated unnecessary strlen() in ntfs_get_ntfs_dos_name()
Since ntfs_ucstombs() returns the output string length, there is no need
to call strlen().
(contributed by Eric Biggers)
Jean-Pierre André [Sat, 11 Feb 2017 08:51:17 +0000 (09:51 +0100)]
Fixed a possible buffer overrun in ntfs_utf16_to_utf8()
If an output buffer was provided, ntfs_utf16_to_utf8() limited the
output string length without the terminating null to 'outs_len'. This
was incorrect because a terminating null was always added to the string,
causing a buffer overrun if the output string happened to have exactly
the maximum length. This was a longstanding bug. Fix it by leaving
space for a terminating null.
(contributed by Eric Biggers)
Jean-Pierre André [Sat, 11 Feb 2017 08:49:03 +0000 (09:49 +0100)]
Made utf16_to_utf8_size() always honor @outs_len
utf16_to_utf8_size() was not guaranteed to fail with ENAMETOOLONG if the
computed length was greater than @outs_len. This could cause a buffer
overrun in ntfs_utf16_to_utf8().
(contributed by Eric Biggers)
Jean-Pierre André [Sat, 11 Feb 2017 08:36:30 +0000 (09:36 +0100)]
Preventing --enable-plugins from disabling the plugins
The plugins are enabled by default, and the can be disabled by the
configure option --disable-plugins, but the option --enable-plugins
also led to disabling them.
Jean-Pierre André [Sat, 11 Feb 2017 08:33:27 +0000 (09:33 +0100)]
Fixed DISABLE_PLUGINS as the condition for not using plugins
The condition for using plugins did not match the definition by
./configure
Jean-Pierre André [Sat, 11 Feb 2017 08:26:58 +0000 (09:26 +0100)]
Fixed nesting when not using plugins
The logical nesting (defined by {...}) did not match the physical nesting
(defined by #ifdef...#endif)
Jean-Pierre André [Sat, 11 Feb 2017 08:22:50 +0000 (09:22 +0100)]
Fixed updating the backup boot sector in ntfslabel
The location of the backup boot sector was one-off
Jean-Pierre André [Sat, 11 Feb 2017 08:15:33 +0000 (09:15 +0100)]
Logged more information when a plugin could not be loaded
Put the explanation from dlerr() into the syslog when a plugin could
not be loaded.
Jean-Pierre André [Sat, 11 Feb 2017 08:11:51 +0000 (09:11 +0100)]
Decoded the reparse tag for deduplication in ntfsinfo
Take into account the reparse tag for deduplication and display its meaning
Jean-Pierre André [Sat, 11 Feb 2017 08:08:22 +0000 (09:08 +0100)]
Included <paths.h> where useful in fuse-lite
Both fusermount.c and mount_util.c use _PATH_MOUNTED, so they should
include <paths.h>, which provides this definition.
This is required for building with the musl C library.
Contributed by Thomas Petazzoni
Jean-Pierre André [Sat, 11 Feb 2017 08:00:49 +0000 (09:00 +0100)]
Denied creating/removing files or directories from $Extend
$Extend is a directory reserved for metadata specific to Windows.
Inserting other files or directories there leads to problems with
some Windows versions.
Jean-Pierre André [Sat, 11 Feb 2017 07:57:37 +0000 (08:57 +0100)]
Replaced secaudit by ntfssecaudit in its own usage output
The usage output did not match the command name change
Jean-Pierre André [Sat, 11 Feb 2017 07:53:20 +0000 (08:53 +0100)]
Fixed bad indentations (cosmetic)
Jean-Pierre André [Fri, 2 Sep 2016 06:30:07 +0000 (08:30 +0200)]
Improved opening/closing $Secure when un/mounting NTFS volume
Call ntfs_close_secure() earlier, check for error, and other cleanups
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Jean-Pierre André [Thu, 28 Jul 2016 14:30:05 +0000 (16:30 +0200)]
Corrected code with misleading indentation
GCC 6 reports a warning in ntfs_allowed_dir_access() because the code has
misleading indentation. Fix by adding braces. There is no actual change
in behavior because of the '(allowed == 2)' condition.
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Jean-Pierre André [Thu, 28 Jul 2016 14:26:21 +0000 (16:26 +0200)]
Corrected validation of multi sector transfer protected records
The validation contained an off-by-one error. The
expression '(u32)(usa_ofs + (usa_count * 2)) > size' used 'usa_count'
after it had been decremented to skip the update sequence number entry.
Consequently, the code could read out of bounds, up to two bytes past the
end of the MST-protected record.
Furthermore, as documented in the comment in layout.h for "NTFS_RECORD"
and also on MSDN for "MULTI_SECTOR_HEADER", the update sequence array
must end before the last le16 in the first logical sector --- not merely
before the end of the record.
Fix the validation and move it into a helper function, as it was done
identically in the read and write paths.
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Jean-Pierre André [Thu, 28 Jul 2016 14:22:16 +0000 (16:22 +0200)]
Always opened $Secure when mounting NTFS volume
Currently, applications that wish to access security descriptors have to
explicitly open the volume's security descriptor index ("$Secure") using
ntfs_open_secure(). Applications are also responsible for closing the
index when done with it. However, the cleanup function for doing,
ntfs_close_secure(), cannot be called easily by all applications because
it requires a SECURITY_CONTEXT argument, not simply the ntfs_volume.
Some applications therefore have to close the inode and index contexts
manually in order to clean up properly.
This proposal updates libntfs-3g to open $Secure unconditonally as part
of ntfs_mount(), so that applications do not have to worry about it.
This proposal updates libntfs-3g to open $Secure unconditonally as part
of ntfs_mount(), so that applications do not have to worry about it.
ntfs_close_secure() is updated to take in a ntfs_volume for internal use,
and ntfs_destroy_security_context() is now the function to call to free
memory associated with a SECURITY_CONTEXT rather than a ntfs_volume.
Some memory leaks in error paths of ntfs_open_secure() are also fixed.
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Jean-Pierre André [Thu, 28 Jul 2016 14:19:29 +0000 (16:19 +0200)]
Fixed tautological comparison
Wrong comparison in ntfscmp.c
Jean-Pierre André [Thu, 28 Jul 2016 14:16:42 +0000 (16:16 +0200)]
Removed unused variables
A few variables in xattrs.c are not used any more
Jean-Pierre André [Thu, 28 Jul 2016 14:13:59 +0000 (16:13 +0200)]
Allowed using full library API on systems without extended attributes support
A number of functions in libntfs-3g are generally useful, but are tied to
extended attributes support and are not included when the library is
built on platforms without extended attributes support.
This proposal updates libntfs-3g to always include these functions.
The only tricky part is dealing with the XATTR_CREATE and XATTR_REPLACE
flags. These flags are defined in <sys/xattr.h>, so they must be
redefined on platforms without extended attributes support.
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Jean-Pierre André [Thu, 28 Jul 2016 14:10:14 +0000 (16:10 +0200)]
Cleaned up file name collation code
- Update documentation for COLLATION_RULES
- Document how ntfs_names_full_collate() compares names
- Update comments and DEBUG code to reflect that ntfs_names_full_collate()
always access 'upcase', even in CASE_SENSITIVE mode
- Remove unneeded assignments to 'c1' and 'c2' in IGNORE_CASE mode
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Jean-Pierre André [Tue, 19 Jul 2016 09:53:28 +0000 (11:53 +0200)]
Allowed dlopen API to be either in libc or libdl
On Linux, the functions in the dlopen API are in libdl. However, on
FreeBSD, libdl doesn't exist and the functions are instead in libc.
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Jean-Pierre André [Tue, 19 Jul 2016 09:50:32 +0000 (11:50 +0200)]
Made plugin.h include all prerequisite declarations
Only <plugin.h> to be included in plugins code.
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Jean-Pierre André [Tue, 19 Jul 2016 09:49:04 +0000 (11:49 +0200)]
Renamed include guard for plugin.h to _NTFS_PLUGIN_H
Be consistent with other NTFS-3G headers and use the "_NTFS_" prefix.
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Jean-Pierre André [Tue, 19 Jul 2016 09:44:59 +0000 (11:44 +0200)]
Cleared the sparse flags when clearing the bad cluster list
The bad cluster list may be updated in ntfsresize and ntfsfix. Though
technically it is organized as a sparse file, Windows does not set
the sparse flags. Do the same to avoid problems with third-party
packages.
Jean-Pierre André [Tue, 19 Jul 2016 09:40:20 +0000 (11:40 +0200)]
Tolerated garbage put by Windows 10 into the last ACE
For some reason, Windows 10 sometimes inserts garbage after the
last ACE of an ACL. The ACL consistency check has to tolerate this.
Jean-Pierre André [Wed, 22 Jun 2016 10:01:25 +0000 (12:01 +0200)]
Compiled out conditionally debug-oriented code
Although ntfs_log_trace() is defined to a no-op in non-DEBUG builds,
ntfs_attr_name_get() is not. This function performs a string conversion
and a memory allocation, so it is nice to have the call to it compiled
out when not needed.
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Jean-Pierre André [Wed, 22 Jun 2016 09:58:20 +0000 (11:58 +0200)]
Fixed ntfs_delete() failure caused by string conversion error
It was possible for ntfs_attr_name_get() to set errno due to a wide
character string that could not be converted to a multibyte string. This
caused ntfs_delete() to fail.
Fix by checking for a nonzero return value specifically from
ntfs_attr_lookup(), rather than assuming that nothing else sets errno.
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Jean-Pierre André [Tue, 31 May 2016 06:33:10 +0000 (08:33 +0200)]
Switch to using the standard autoconf AC_HEADER_MAJOR macro
Switch to the standard autoconf AC_HEADER_MAJOR macro which takes care
of the ugly details like when to use mkdev.h and when to use sysmacros.h.
(requires <sys/types.h> to be included)
Also include these in all files that use major/minor/makedev funcs.
(Contributed by Mike Frysinger)
Jean-Pierre André [Tue, 31 May 2016 06:24:23 +0000 (08:24 +0200)]
Silenced a truncation warning in upper case table
The upper case value for 0x1d79 is 0xa77d, so the difference is 0x8a04,
which overflows in the table which defines the computation of upper case
values. Rewriting this difference as -0x75fc leads to the same result
in an upper case table truncated to two bytes, and this avoid the
compiler warning.
Jean-Pierre André [Wed, 4 May 2016 08:15:35 +0000 (10:15 +0200)]
Ported patches to libfuse from the OpenIndiana variant
A few patches had been found useful to the OpenIndiana variant of libfuse
(2.7.6). Port them to libfuse-lite and restrict them to Solaris/OpenIndiana.
Jean-Pierre André [Wed, 4 May 2016 08:08:06 +0000 (10:08 +0200)]
383 Fixed masks for major and minor in fuse-lite for OpenIndiana
On Solaris/OpenIndiana, the major and minor fields in st_rdev have to
be represented on 14 bits and 18 bits respectively. They must have
the same representation on 32-bit and 64-bit builds as the kernel
and the library do not know the word size of each other.
Jean-Pierre André [Wed, 4 May 2016 08:03:39 +0000 (10:03 +0200)]
Used <sys/mkdev.h> instead of <sys/sysmacros.h> on OpenIndiana
On Solaris/OpenIndiana, use the macroes makedev(), major() and minor()
from <sys/mkdev.h>. Those from <sys/sysmacros.h> are inappropriate for
current builds.
Jean-Pierre André [Wed, 4 May 2016 07:59:18 +0000 (09:59 +0200)]
Redefined ELIBBAD as ENOEXEC when missing
When a plugin cannot be initialized a ELIBBAD error is returned on Linux
and OpenIndiana. As this is not a Posix error code, use ENOEXEC on
systems which do not define ELIBBAD.
Jean-Pierre André [Wed, 4 May 2016 07:55:16 +0000 (09:55 +0200)]
Updated information about ntfsprogs to the README file
Added mentions of ntfssecaudit, ntfsusermap and ntfsrecover to the
README file.
Jean-Pierre André [Wed, 4 May 2016 07:47:51 +0000 (09:47 +0200)]
Defined an option to kill the Windows cache and play the log file
The new ntfsrecover option --kill-fast-restart can be used to delete
the Windows fast-restart indication before playing the log. This can
lead to data loss, but is needed before mounting a partition improperly
unmounted from Windows when remounting on Windows is inconvenient.
Jean-Pierre André [Wed, 4 May 2016 07:39:48 +0000 (09:39 +0200)]
Rejected implicit mounting read-only when hiberfile option is present
If the remove_hiberfile mount option is present, explicitly disallow
the library from switching to a read-only mount. This is only to avoid
confusion, as the remove_hiberfile is processed before taking the
decision to fall back to read-only.
Jean-Pierre André [Wed, 4 May 2016 07:33:42 +0000 (09:33 +0200)]
Used Microsoft terminology for SID names
A few SIDs descriptions might be confusing because of a wording different
from Microsoft usage.
Jean-Pierre André [Wed, 4 May 2016 07:30:48 +0000 (09:30 +0200)]
Displayed the SID revision as an unsigned number (cosmetic)
Properly display a SID revision if it should ever reach 128.
(suggested by Ulf Zibis)
Jean-Pierre André [Wed, 4 May 2016 07:27:32 +0000 (09:27 +0200)]
Checked the number of subauthorities before accessing them
Be more crash resistent when analyzing a badly formed SID.
(contributed by Ulf Zibis)
Jean-Pierre André [Wed, 4 May 2016 07:24:51 +0000 (09:24 +0200)]
Fixed segmentation fault on empty $LogFile in ntfsrecover
ntfsrecover -f -v <log file> receives a SIGSEGV because of trying to
read memory outside allocated buffer because of no sanity checks on
restart page header values. This happens on an empty $LogFile because
of no basic checks present. Attached patch adds basic checks similar
to those inside logfile library and allows tool to exit with more
suitable message.
(contributed by Rakesh Pandit)
Jean-Pierre André [Wed, 4 May 2016 07:19:39 +0000 (09:19 +0200)]
Fixed a missing "break" in ntfssecaudit.c
A missing "break" in a case construct could be troublesome.
(suggested by Ulf Zibis)
Jean-Pierre André [Wed, 4 May 2016 07:15:43 +0000 (09:15 +0200)]
Fixed indentation in ntfssecaudit.c (cosmetic)
There was an abusive indentation.
Erik Larsson [Tue, 12 Apr 2016 15:02:40 +0000 (17:02 +0200)]
unistr.c: Unify the two defines NOREVBOM and ALLOW_BROKEN_SURROGATES.
In the mailing list discussion we came to the conclusion that there
doesn't seem to be any reason to keep these declarations separate since
they address the same issue, namely libntfs-3g's tolerance for bad
Unicode data in filenames and other UTF-16 strings in the file system,
so merge the two defines into the new define ALLOW_BROKEN_UNICODE.
Erik Larsson [Fri, 8 Apr 2016 03:39:48 +0000 (05:39 +0200)]
unistr.c: Enable encoding broken UTF-16 into broken UTF-8, A.K.A. WTF-8.
Windows filenames may contain invalid UTF-16 sequences (specifically
broken surrogate pairs), which cannot be converted to UTF-8 if we do
strict conversion.
This patch enables encoding broken UTF-16 into similarly broken UTF-8 by
encoding any surrogate character that don't have a match into a separate
3-byte UTF-8 sequence.
This is "sort of" valid UTF-8, but not valid Unicode since the code
points used for surrogate pair encoding are not supposed to occur in a
valid Unicode string... but on the other hand the source UTF-16 data is
also broken, so we aren't really making things any worse.
This format is sometimes referred to as WTF-8 (Wobbly Translation
Format, 8-bit encoding) and is a common solution to represent broken
UTF-16 as UTF-8.
It is a lossless round-trip conversion, i.e converting from broken
UTF-16 to "WTF-8" and back to UTF-16 yields the same broken UTF-16
sequence. Because of this property it enables accessing these files
by filename through ntfs-3g and the ntfsprogs (e.g. ls -la works as
expected).
To disable this behaviour you can pass the preprocessor/compiler flag
'-DALLOW_BROKEN_SURROGATES=0' when building ntfs-3g.
Jean-Pierre André [Thu, 7 Apr 2016 07:36:01 +0000 (09:36 +0200)]
Deleted file secaudit.h
The declarations for compiling secaudit on Windows are not used any more
and can be dropped.
Jean-Pierre André [Thu, 7 Apr 2016 07:32:26 +0000 (09:32 +0200)]
Removed declarations for using acls.c outside ntfs-3g
The declarations for using acls.c within secaudit on Windows are not used
any more and can be dropped.
Jean-Pierre André [Thu, 7 Apr 2016 07:20:23 +0000 (09:20 +0200)]
Adapted secaudit and usermap (now ntfssecaudit and ntfsusermap) to ntfsprogs
These tools were originally developed for running on Windows and later
ported to libntfs-3g. This patch makes them similar to other ntfsprogs
tools, dropping the native Windows interfaces and using libntfs-3g on
all platforms.
There is no change in usage or supported features, only the command
names have changed.
Jean-Pierre André [Thu, 7 Apr 2016 07:07:13 +0000 (09:07 +0200)]
Moved secaudit and usermap to directory ntfsprogs
These tools were developped before the ntfsprogs were merged into ntfs-3g,
redesigning them like the ntfsprogs make the code simpler.
Note : at this stage secaudit and usermap cannot be built any more.
Jean-Pierre André [Wed, 6 Apr 2016 09:09:35 +0000 (11:09 +0200)]
Fixed indentation in ntfsclone help text (cosmetic)
The tabs in source code appear differently in actual output.
Jean-Pierre André [Wed, 6 Apr 2016 09:07:30 +0000 (11:07 +0200)]
Fixed a spelling error in ntfsresize manual (cosmetic)
an other -> another
Jean-Pierre André [Wed, 6 Apr 2016 09:03:31 +0000 (11:03 +0200)]
Moved general declarations from ntfsrecover.h to logfile.h
The declarations related to the log file structure are now grouped
in logfile.h, those specific to the recovery process are kept in
ntfsrecover.h
Jean-Pierre André [Wed, 6 Apr 2016 08:58:25 +0000 (10:58 +0200)]
Added a usn field to RESTART_PAGE_HEADER
Prepare merging ntfsrecover.h into logfile.h by adding a usn field to
RESTART_PAGE_HEADER. As this changes the record size, ignore the new
field in existing code.
Jean-Pierre André [Wed, 6 Apr 2016 08:54:51 +0000 (10:54 +0200)]
Renamed reserved fields in ntfsrecover the same way as in logfile.h
Prepare merging ntfsrecover.h into logfile.h by naming reserved fields
the same way.
Jean-Pierre André [Wed, 6 Apr 2016 08:52:18 +0000 (10:52 +0200)]
Renamed record_length as log_record_header_length in ntfsrecover.h
Prepare merging ntfsrecover.h into logfile.h by naming the record
header length the same way.
Jean-Pierre André [Wed, 6 Apr 2016 08:50:31 +0000 (10:50 +0200)]
Renamed restart_offset as restart_area_offset in ntfsrecover.h
Prepare merging ntfsrecover.h into logfile.h by renaming the restart
offset the same way.
Jean-Pierre André [Wed, 6 Apr 2016 08:45:30 +0000 (10:45 +0200)]
Redefined target_vcn on 64 bits in ntfsrecover.h
In a log record, the target vcn has to be stored on 64 bits
Jean-Pierre André [Wed, 6 Apr 2016 08:40:28 +0000 (10:40 +0200)]
Redefined file_offset on 64 bits in ntfsrecover.h
The log file offsets are apparently stored on 64 bits, though the file
size is unlikely to reach 2MB.
Jean-Pierre André [Wed, 6 Apr 2016 08:38:06 +0000 (10:38 +0200)]
Unfolded record headers in ntfsrecover the same way as in logfile.h
Prepare merging ntfsrecover.h into logfile.h by unfolding the record
headers the same way.
Jean-Pierre André [Wed, 6 Apr 2016 08:34:46 +0000 (10:34 +0200)]
Typedef'ed new structs in ntfsrecover the same way as in logfile.h
Prepare merging ntfsrecover.h into logfile.h by declaring new structs
the same was as in logfile.h
Jean-Pierre André [Wed, 6 Apr 2016 08:32:39 +0000 (10:32 +0200)]
Typedef'ed old structs in ntfsrecover the same way as in logfile.h
Prepare merging ntfsrecover.h into logfile.h by declaring duplicated
structs the same way
Jean-Pierre André [Wed, 6 Apr 2016 08:26:46 +0000 (10:26 +0200)]
Redefined ntfsrecover enums as little-endian values
Rather than cpu-endian values, use little-endian ones in ntfsrecover
for similarity with layout.h
Jean-Pierre André [Wed, 6 Apr 2016 08:17:27 +0000 (10:17 +0200)]
Made a full check for whether a user extended attribute is allowed
User extended attributes should only be set on files and directories,
not on symlinks, sockets, devices, etc. For safety they are also
forbidden on metadata files, but should be allowed on the root
directory. For files based on reparse points, requests are made
to the plugin to determine the type.
Jean-Pierre André [Wed, 6 Apr 2016 08:11:08 +0000 (10:11 +0200)]
Translated directory separators when running ntfscluster on Windows
Use \ as a directory separator when running on Windows.
Jean-Pierre André [Wed, 6 Apr 2016 08:08:01 +0000 (10:08 +0200)]
Returned an error code for an exclusive access violation on Windows
Translate to Windows error code STATUS_SHARING_VIOLATION to Unix error
code EBUSY.
Jean-Pierre André [Wed, 6 Apr 2016 08:02:23 +0000 (10:02 +0200)]
Fixed the maximum size of an ACL
Define the maximum size of an ACL as results from the maximum number of
sub-authorities defined in layout.h
Jean-Pierre André [Wed, 6 Apr 2016 07:57:59 +0000 (09:57 +0200)]
Used a more portable way to force alignment in security.h
Defining an array of zero elements does not force alignment on some CPUs,
insert a filler.
Jean-Pierre André [Wed, 6 Apr 2016 07:51:47 +0000 (09:51 +0200)]
Enabled fallback to read-only mount when volume is hibernated
When a volume is found hibernated (or prepared for fast restarting),
it is force-mounted as read-only.
Jean-Pierre André [Wed, 6 Apr 2016 07:44:59 +0000 (09:44 +0200)]
Allowed kernel cacheing by lowntfs-3g when not using Posix ACLs
Kernel cacheing of file attributes is usually not used by ntfs-3g,
because it has defects when dealing with hard linked files and directory
permission checks. Kernel cacheing is however possible when using
lowntfs-3g and not using Posix ACLs.
Jean-Pierre André [Wed, 6 Apr 2016 07:42:16 +0000 (09:42 +0200)]
Fixed bad test in fuse mount
Apply a fix from the full fuse library
Jean-Pierre André [Wed, 6 Apr 2016 07:32:18 +0000 (09:32 +0200)]
Silenced fixup warnings when allocating a new MFT record
When creating a new MFT record, do not issue a warning if the current
record has bad fixups. These warnings are meaningless, difficult to
interpret and cause unneeded worries.
Jean-Pierre André [Wed, 6 Apr 2016 07:27:07 +0000 (09:27 +0200)]
Added clarification about creating a partition to the ntfsclone manual
Try to make clear the option --output feeds data into a partition, but
does not create the partition.
Jean-Pierre André [Wed, 6 Apr 2016 07:10:35 +0000 (09:10 +0200)]
Used plugins to process reparse points
The new "system compression" files used by Windows 10 make use of reparse
points to record the compression parameters, and a specific named data
stream is used to store the compressed data. With this patch, processing
of reparse points can be done by an external plugin only loaded as needed.
Junctions and symlinks, which are also based on reparse points, are now
processed by "internal plugins".
Jean-Pierre André [Wed, 6 Apr 2016 06:51:36 +0000 (08:51 +0200)]
Added an option for preserving the full log file in ntfsclone
Usually, only a few pages of the Windows log file are saved in an
ntfsclone image. This is inappropriate for building reference images
for recovering the log, and the --full-logfile option serves that
purpose.