Commit Graph

1513 Commits (edge)

Author SHA1 Message Date
Erik Larsson 6b3f096069 ntfsprogs/Makefile.am: Only install manpages for 'extras' when enabled.
We used to always install all the manpages, but some are specific to the
'extras' enabled with the configure option '--enable-extras'.
Fixed by only installing the 'extras' manpages when '--enable-extras' is
active.

Also since this commit touches the list of manpages a bit of cleanup was
done to make sure there's only one manpage per line (helps to minimize
diffs) and also that the manpages are sorted in alphabetical order in
ntfsprogs/Makefile.am to avoid future confusion.

Thanks to user 'opty77' for reporting this issue:
https://github.com/tuxera/ntfs-3g/issues/82
2023-05-28 08:21:34 +03:00
Erik Larsson e73d481a76 mkntfs.c: Enable microsecond-precision volume creation time.
Previously the creation time was filled in with seconds (obtained using
time(NULL)) but the microsecond part was left zeroed. Fixed by using
gettimeofday when available.
2022-12-12 18:51:12 +02:00
Jean-Pierre André 96412e28e5 Fixed possible out-of-buffer condition in ntfsck
A bad usa_count could lead to an out-of-buffer condition. Just avoid
the issue and report the error, still not fix it.
2022-05-10 10:30:24 +02:00
Jean-Pierre André 92b9fbc6fe Updated the urls present in the ntfsprogs manuals
The urls now point at Github
2021-08-30 10:42:14 +02:00
Jean-Pierre André f3999a74c6 Fixed consistency check of MFT attributes in ntfsfix
The consistency check could be defeated as a consequence of integer overflow.
Reorganize it to avoid such situations.
2021-07-12 08:31:17 +02:00
Jean-Pierre André d60175230a Added consistency check of MFT attributes in ntfsfix
Make sure the searched attribute is fully within the MFT record and is
correctly aligned.
2021-05-17 15:36:58 +03:00
Jean-Pierre André 5bdfac9704 Added generic checks of MFT records in ntfsfix
Before acting on MFT, make sure it passes the consistency check.
2021-05-17 15:35:51 +03:00
Erik Larsson 477a4dfe5e ntfscp.c: Fix improper unsigned const endianness macro for signed type. 2021-03-05 14:56:31 +02:00
Jean-Pierre André 56b8e713d5 Fixed a constant string concatenation
Adjust for recent compilers requiring a space between concatenated strings.
2021-01-26 10:06:18 +01:00
Jean-Pierre André 8073ab6764 Supported use of WSL special file
The Windows Subsystem for Linux (WSL) of Windows 10 uses reparse points
to record special files (symlinks, fifos, sockets, char or block devices).
Honor such reparse points with the same meaning as WSL.
2021-01-26 10:06:17 +01:00
Jean-Pierre André 7bcae8743f Allowed customization of sbin for tool directory
Enabled the configure option --sbindir to define where a few ntfsprogs
tools should be installed
2020-11-18 11:29:05 +01:00
Jean-Pierre André aecd9f011e Decoded execlink reparse data
Add execlink to the list of recognized reparse tags.
2020-03-08 09:57:27 +01:00
Jean-Pierre André 4c8d97cbd2 Fixed ntfsfallocate on a void file
The situation when there were no runlist when ntfsfallocate is applied
was not taken into account.
2020-03-08 09:51:48 +01:00
Jean-Pierre André eddd96f9e6 Fixed a poorly sized string in ntfsinfo
A string overflow was possible, extend its size to worst case.
2020-03-08 09:44:52 +01:00
Jean-Pierre André 8e01e1ed65 Fixed a wrong fallthrough situation in ntfscat
A fallthrough situation was not intentional.
2020-03-08 09:42:15 +01:00
Jean-Pierre André 004709fcc1 Silenced warnings about fallthrough situations in switch cases of ntfsprogs
Insert comments to silence compiler about fallthrough situations when
they are wanted.
2020-03-08 09:38:00 +01:00
Jean-Pierre André 006799ab80 Fixed an endianness error in ntfscp
The file timestamp was not set according to CPU endianness.
2019-01-23 17:38:10 +01:00
Jean-Pierre André f424cea20a Fixed a typo in the ntfscluster manual
An essential word was missing.
2018-12-19 15:53:08 +01:00
Jean-Pierre André e87c853551 Fixed collecting the label argument in mkntfs
The label argument could be wrongly interpreted, depending on the syntax
use to state the options.
2018-08-22 09:46:30 +02:00
Jean-Pierre André 90c361e7f8 Allocated full clusters for reading and rescuing in ntfsclone
Even though mft or index records may be smaller than a cluster,
reading and rescuing them is done on a full cluster base, so
full clusters must be allocated for processing them.
2018-08-02 16:41:19 +02:00
Jean-Pierre André f862fcee00 Extended the allowed cluster size to 2MB
From Windows 10 Creators edition, the cluster size limit has been
extended to 2MB. This has implied redefining the boot sector field
"sectors_per_cluster" so that values greater than 128 can be recorded.
2018-06-01 16:29:01 +02:00
Jean-Pierre André e758709a2c Appended a number to undeleted file name to avoid overwriting an existing one
When an undeleted file name conflicts with an existing one, it is
renamed in order to preserve the existing one.
2018-06-01 16:21:33 +02:00
Jean-Pierre André a951ed7f61 Added an option to ntfscp to copy the modification time
When using option -t the modification timestamp is copied by ntfscp
2018-06-01 16:18:51 +02:00
Jean-Pierre André 4f450a35f5 Made accessing reparse directories through internal plugins
When the bit 28 of a reparse tag is set on a directory, the reparse
information should be ignored and the directory should be accessed
the usual way (this setting is new to Windows 10). In such a situation
access to the directory through an internal plugin rather than through
an external one.
The same policy applies to REPARSE_TAG_WCI which had been defined
earlier without the bit 28 being set.
2018-06-01 16:08:33 +02:00
Jean-Pierre André f334c1fdc3 Delayed updating the MFT runlist when resizing in read-only mode
When trying a resize in "no action" (read-only) mode, and the MFT runlist
has to be reorganized to take its new fragmentation into account, the updated
runlist cannot be read from the device while updating the runlist of
normal files. To avoid having to read the updated runlist, the update
is delayed so that the original runlist is used. As a consequence the test
of reorganizing the runlists is only an approximation of what would happen
in a real resize.
2018-02-13 08:54:12 +01:00
Jean-Pierre André b30460fede Removed an obsolete reference for getting support
Remove from the ntfsresize man page an archaic url for getting support.
2018-02-13 08:43:53 +01:00
Jean-Pierre André 3243e62396 Supported reparse tags for OneDrive cloud storage
Newer versions of Windows 10 use several reparse tags for files which
are synchronized to OneDrive cloud storage (0x9000301a, 0x9000601a,
0x9000701a, ...). identify them as IO_REPARSE_TAG_CLOUD and use a
single plugin to process them.
2018-01-15 11:04:29 +01:00
Jean-Pierre André 5239986093 Silenced compiler warnings in ntfsrecover
Silence the compiler warnings which were introduced in a recent update.
2017-12-22 11:37:58 +01:00
Jean-Pierre André 85e208176f Stopped checking matches of MFTMirr against MFT at record 16
Since its 2017 edition, Windows 10 has stopped mirroring $MFT to the
full size of $MFTMirr leading to mounts of partitions with big clusters
to be rejected because of mismatches. With this patch, only 16 records
are checked, though mirroring is still done for all records in $MFTMirr.
2017-12-22 11:29:00 +01:00
Jean-Pierre André 1f863fef7d Processed redo log actions associated to undoing a CompensationlogRecord
At least when there is a shortage of space on the target device, several
redo actions are associated to undoing a CompensationlogRecord, and they
should be redone upon recovery.
2017-10-26 10:44:36 +02:00
Jean-Pierre André f06672a02c Checked log file blocks more recent than temporary ones
Under some circumstances, the temporary log file blocks are not the
latest ones, so check whether there are more recent ones.
Only done for log version 1.x, as log version 2.x follow a different
logic.
2017-10-26 10:40:17 +02:00
Jean-Pierre André 02747ea647 Aligned internal log buffers on CPUs which require them
The generic buffer structure should respect the alignment of included
log structures. This is required by some CPUs (such as Sparc).
2017-10-26 10:33:29 +02:00
Jean-Pierre André 45ba639781 Decoded more reparse tags in ntfsinfo
Displayed some information in ntfsinfo output about a few new types of
reparse point brought by Windows 10.
2017-08-11 09:52:54 +02:00
Jean-Pierre André cdd58aaee3 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.
2017-06-20 08:56:00 +02:00
Jean-Pierre André 866f5cf9e6 Mentioned ntfsfallocate and ntfsrecover in the general ntfsprogs manual
The most recent ntfsprogs utilities should be referenced in the table of
contents.
2017-06-20 08:51:09 +02:00
Jean-Pierre André 5be0b9f62a 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.
2017-05-25 10:52:54 +02:00
Jean-Pierre André 1797ab5ecd 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.
2017-05-25 10:44:18 +02:00
Jean-Pierre André ba810877ca 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.
2017-05-25 10:28:05 +02:00
Jean-Pierre André 79ea3b49b1 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.
2017-03-22 17:49:40 +01:00
Erik Larsson b11a5ea91b ntfsusermap.c: Fix warning about implicit conversion between enums. 2017-03-21 12:06:04 +01:00
Erik Larsson f0d3751c98 Fix bad native->little endian byteswap of little endian value. 2017-03-21 11:58:30 +01:00
Erik Larsson 65f63fe2b3 Use signed endian conversion macros for signed little-endian members. 2017-03-21 11:55:41 +01:00
Jean-Pierre André 275edd5353 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.
2017-03-18 15:42:00 +01:00
Jean-Pierre André 94677ae961 Accepted displaying bad security descriptors on conditions
Display security descriptors in ntfssecaudit when they appear as
correctly formed, even when they contain unsupported items.
2017-02-11 10:37:47 +01:00
Jean-Pierre André 8f0fbd286d Fixed updating the backup boot sector in ntfslabel
The location of the backup boot sector was one-off
2017-02-11 09:22:50 +01:00
Jean-Pierre André 2eb5052480 Decoded the reparse tag for deduplication in ntfsinfo
Take into account the reparse tag for deduplication and display its meaning
2017-02-11 09:11:51 +01:00
Jean-Pierre André b66f5f8241 Replaced secaudit by ntfssecaudit in its own usage output
The usage output did not match the command name change
2017-02-11 08:57:37 +01:00
Jean-Pierre André ab4c6a6141 Fixed tautological comparison
Wrong comparison in ntfscmp.c
2016-07-28 16:19:29 +02:00
Jean-Pierre André 38ff4602a7 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.
2016-07-19 11:44:59 +02:00
Jean-Pierre André 4278fbb7f6 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.
2016-05-04 09:47:51 +02:00