Commit Graph

4736 Commits

Author SHA1 Message Date
Jean-Pierre André
f61aaf012c Made secaudit to be runnable on OpenIndiana
A few differences in dynamic linking.
2012-08-20 14:22:10 +02:00
Jean-Pierre André
3461acd0c2 Changed "blocks" to "sectors" in the mkntfs manual
The last (optional) argument in mkntfs was described as a block count,
which may be confusing because in ext[123] a block means a cluster.
2012-08-20 14:17:09 +02:00
Jean-Pierre André
eecc700df1 Inserted in the manual an explanation for the $Info stream in $UpCase 2012-08-20 14:14:15 +02:00
Jean-Pierre André
9d22736044 Inserted an $Info stream in $UpCase to comply with Windows 8
Since Windows 8 a new stream is added to the upper case file to record
a CRC of the upper case data. This way, if the file does not match the
one defined on the current Windows system, chkdsk can tell whether the
file is damaged or just out of date, and an error is only displayed if
the file is damaged.

The $Info data has been checked to be ignored by Windows XP, Windows
Vista and Windows 7. If not present, chkdsk for Windows 8 complains about
a wrong upper case file.
2012-08-20 14:01:53 +02:00
Jean-Pierre André
262a0559ac Fixed the computation of named attributes sizes in mkntfs
The named attributes sizes were wrongly computed in mkntfs. This did not
lead to visible errors so far owing to 8-byte alignments in attribute
records (current names $SDS, $R, $O, etc).
2012-08-20 13:57:00 +02:00
Jean-Pierre André
f793ead700 Cosmetic : avoided having a hardcoded knowledge of upcase table size in mkntfs 2012-08-20 13:53:48 +02:00
Jean-Pierre André
35eab4044e Avoided an unnecessary runlist update when appending data to a file
Appending data to a file is done in two steps : first extending the
file to the required size, then inserting data in the created space.
There is no need to recompute the runlist at the end of the first
step, just be sure the original configuration is rolled back if inserting
data leads to an error.
2012-08-20 13:48:49 +02:00
Jean-Pierre André
ba3cb2c88b Fixed displaying progress percentage for metadata images
When building (options -ms) or restoring a metadata image, the progress
percentages were wrong (evaluated against a wrong base)
2012-08-20 13:44:33 +02:00
Jean-Pierre André
f61b34ee2c Ignored permissions when listing xattrs for special files
Special files (FIFOs, SOCKETs, etc.) are not allowed to have user extended
attributes. When listing their extended attributes, return none without
checking whether the calling process is allowed to access these files.
2012-08-20 12:45:21 +02:00
Jean-Pierre André
3103a6c383 Extended Windows-type ACL inheritance, as needed by Windows 8
Windows 8 uses "Authenticated user" principals which needs to be replaced
by the actual owner when inheriting
2012-08-20 12:36:45 +02:00
Jean-Pierre André
4b651b9340 Processed ACLs with no mentioned rights for owner (used by Windows8)
Windows 8 uses ACL patterns in which the owner has only implicit rights
(pattern not used by previous Windows versions)
2012-08-20 12:28:15 +02:00
Jean-Pierre André
8ae20018df Fixed the fixing of the backup boot sector in ntfsfix
ntfsfix now checks and update the backup boot sector on the last sector of
the partition (instead of the sector next to end of the file system). After
an ntfsresize the file system generally does not use the maximum size because
of different roundings and required alignments in the resizing and the
repartitioning.
2012-07-06 09:56:50 +02:00
Jean-Pierre André
db5af00af6 Processed junctions and symlinks whose target references another one
When the target of a junction or a Windows-type symlink references another
junction or symlink, the search for the full path on the current partition
and its translation for case-sensitive access is interrupted. The target can
now be dereferenced, provided the end of the path needed no translation.
2012-07-06 09:48:05 +02:00
Jean-Pierre André
ab6f7c027d Extended the wiping of file tails to all data attributes in ntfswipe
This patch adds the wiping of the tails of named data attributes to
ntfswipe.
2012-06-18 13:00:17 +02:00
Jean-Pierre André
7a93d1790a Added processing of SACLs to secaudit on Windows (nickgarvey)
This patch adds the processing of SACLs to secaudit on Windows, but
requested the required privileges.
2012-06-18 12:57:40 +02:00
Jean-Pierre André
0f8ef123ea Added inheritance of the set-group-id flag
So far the set-group-id flag could be set in a chmod. This patch enables
the inheritance of the group to files and subdirectories, and the
inheritance of the set-group-id flag to subdirectories.
2012-06-18 12:53:25 +02:00
Jean-Pierre André
93ac6ce3bf Removed the suggestions to use option remove_hiberfile
The suggestion to use option remove_hiberfile was displayed in the
standard help and when a volume is found dirty. As this option may
lead to loss of data, only mention it in the manual, with a proper
warning.
2012-06-18 12:46:21 +02:00
Jean-Pierre André
24c9f19065 Added optional wiping of file tails and undelete data to ntfswipe (Bogdan)
Added more wiping options to ntfswipe (to avoid leaking of deleted data).
2012-06-18 12:41:51 +02:00
Jean-Pierre André
8f896f112a Added an optional argument (number of seconds) to the option delay_mtime
The option delay_mtime avoid updating the mtime of a file after each
individual updating. With this patch, the frequency of the update can
be adjusted to needs (default 60s). This is mainly useful for big files
which are kept open for a long period (file system images, virtual
computers, etc.)
2012-06-18 12:34:56 +02:00
Jean-Pierre André
9704ff9396 Processed ACL inheritance for authenticated users
Under some conditions, Windows defines an ACL inheritance for an
unidentified authenticated user. With this patch, such an unidentified
user is treated as any user (same as "world").
2012-06-18 12:27:38 +02:00
Jean-Pierre André
464a9156cd Fixed a wrong computation of ACL size (minor issue) 2012-06-18 12:26:36 +02:00
Jean-Pierre André
9ae4165ee8 Added allocation data to output of "ntfsinfo -m"
Volume state and the level of allocation were added to the output
of "ntfsinfo -m", they are useful to identify the state of a volume.
2012-06-18 12:19:27 +02:00
Jean-Pierre André
dba29ee6e7 Implemented the fixing of the backup boot sector in ntfsfix
This checks the backup boot sector and fixes it as needed.
2012-03-21 19:35:30 +01:00
Jean-Pierre André
1ad9bdad4d Avoided interpreting UTIME_NOW and UTIME_OMIT from external fuse
UTIME_NOW and UTIME_OMIT are needed for implementing utimensat() and
futimens(2), but they cannot yet be used with external fuse.
This patch is to avoid errors if they cannot be used, even with fuse 4.9
2012-03-21 19:26:00 +01:00
Jean-Pierre André
911ecba5e2 Set the hidden flag according to the latest name when hide_dot_files is set
When the hide_dot_files option is set, a file is marked hidden if the
first character in its name is a dot. This patch updates the hidden flag
when the file is renamed or hard linked (useful for text editors which
create files with a temporary name)
2012-03-21 19:19:39 +01:00
Jean-Pierre André
4e29280cb2 Kept the name of a deleted file in place for easier undeletion
When a file is deleted, there is no need to remove its last name in
the deleted MFT record. The name may be useful for undeleting the file
later (Windows also does not delete the name).
2012-03-21 19:14:03 +01:00
Jean-Pierre André
37ae85a9d5 Cosmetic : moved the basename(3) redefinition to a better location
basename(3) is not available on OpenIndiana and had to be redefined.
Just move the redefinition to a more standard location
2012-03-21 19:09:52 +01:00
Jean-Pierre André
2b779a6510 Implemented the check for already mounted device on OpenIndiana
This adds a variant for checking on OpenIndiana whether a device
is mentioned in /etc/mnttab as being mounted.
2012-03-21 19:01:33 +01:00
Jean-Pierre André
66416041ec Reverted the workaround for ftruncate() and access(W_OK) on OpenIndiana
The special tests for accepting ftruncate(2) and access(W_OK) applied
to a file being created read-only have been implemented in the fuse
kernel module, so there is no need to duplicate them in the file system.
2012-03-21 18:56:05 +01:00
Jean-Pierre André
1c93e2a97d Avoided setuid/setgid removal by chown on OpenIndiana
On OpenIndiana, it is not customary to remove the setuid/setgid flags
when doing a chown, so comply with the local rules.
2012-03-21 18:52:07 +01:00
Jean-Pierre André
319958545e Made sure directories are not hard linked
On OpenIndiana the fuse kernel module does not prevent link(2) from
hard linking directories, so this has to be done in the lowntfs-3g
driver.
2012-03-21 18:48:38 +01:00
Jean-Pierre André
e82240f499 Made sure rmdir is only used for directories, and unlink otherwise
On OpenIndiana the fuse kernel module does not prevent unlink(2)
from deleting directories, nor prevent rmdir(2) from deleting files,
so this has to be done in the lowntfs-3g driver.
2012-03-21 18:42:29 +01:00
Jean-Pierre André
f78cc45208 Implemented supplementary group checks for OpenIndiana
Checking supplementary groups permissions to access a file relies on
a supplementary group list available in /proc/PID. This patch adds a
variant to implement the checks based on the specific format used
by OpenIndiana.
2012-03-21 18:34:48 +01:00
Jean-Pierre André
66d30c86b3 Implemented an option to set a new serial number in ntfslabel
Defined new options --new-serial and --new-half-serial to set a new
serial number (either the given one or a random one) to a file system.
Useful for mounting the original and the cloned file system at the
same time.
2012-01-23 18:22:59 +01:00
Jean-Pierre André
54f96e4af1 Implemented an option to set a new serial number in ntfsclone
Defined new options --new-serial and --new-half-serial to set a new
random serial number when cloning or restoring a file system.
Useful for mounting the original and the cloned file system at the
same time.
2012-01-23 18:19:17 +01:00
Jean-Pierre André
e7bfd31de4 Fixed clearing user data when creating metadata images
Clearing of user data was wrong when extracting the metadata into a
special format image. In this situation the clearing has to be done
without mounting the file system.
2012-01-23 18:13:59 +01:00
Jean-Pierre André
4a0892eb26 Implemented a new option -q to avoid updating the progress information (Matthew Boyle)
The progress bars complexify the integration of ntfsclone into other
tools, the option -q (or --quiet) gets rid of them.
2012-01-23 18:10:26 +01:00
Jean-Pierre André
cd0be288b9 Fixed debug check for double opening after deleting an inode
A debug check could be defeated when a deleted inode number was reused.
2012-01-23 18:05:27 +01:00
Jean-Pierre André
a5e656751d Worked around basename(3) not present on OpenIndiana 2012-01-23 18:03:59 +01:00
Jean-Pierre André
e85d986494 Put the device name as the last option
On OpenIndiana the device names have commas, so put it as the last option
to prevent defeating the options parsing.
2012-01-23 18:00:18 +01:00
Jean-Pierre André
08ad3b4977 Mounted with an absolute mount point on OpenIndiana
OpenIndiana requires that the mount points be defined on a full
absolute patch. Give it what it needs.
2012-01-23 17:56:15 +01:00
Jean-Pierre André
458c5eb191 Worked around write checks for ftruncate() and access(W_OK) on OpenIndiana
When a file is created with no write permissions, ftruncate and
access(W_OK) should be allowed, but this check has to be made by the
file system on OpenIndiana.
This patch is not active on Linux (#ifdef'ed)
2012-01-23 17:49:38 +01:00
Jean-Pierre André
b25178fec3 Strengthened sanity checks on readdir/closedir
Be more defensive against readdir() on closed directories.
2012-01-23 17:45:12 +01:00
Jean-Pierre André
ac8a980e7a Preferred access control by file system on OpenIndiana
ntfs-3g cannot reliably use the access control made by the kernel on
OpenIndiana, so do it at the file system level until this is solved.
2012-01-23 17:39:47 +01:00
Jean-Pierre André
d85675bf6d Returned unmount errors in ntfs-3g.probe (Diego Elio Petteno)
ntfs-3g.probe is used to get information about mounting errors, this
extends the use for unmounting errors.
2012-01-23 17:34:19 +01:00
Jean-Pierre André
528b4303b2 Accepted multiple read-only mounts
Multiple mounts of a partition is now allowed provided they are all
in read-only mode.
2012-01-23 17:31:15 +01:00
Jean-Pierre André
c9edd32113 changed error return for user access to trusted xattr
When a user queries an extended attribute in the trusted namespace,
the traditional error return was EPERM. This has been recently changed
to ENODATA. See https://lkml.org/lkml/2011/5/27/199
2012-01-23 17:25:55 +01:00
Jean-Pierre André
0aa68c128d output the numbers of runs and fragments in ntfsinfo
It is difficult to identify whether a file from a user complaining about
bad throughput is over-fragmented, so get the information from ntfsinfo.
2012-01-23 17:20:20 +01:00
Jean-Pierre André
3c6e88cb0f fixed checking whether Windows 7 was hibernated
On Windows XP and Vista, the system hibernation is identified by the
sequence "hibr" at the beginning of hiberfil.sys. This had been changed
to "HIBR" in Windows 7, so both sequences have to be accepted as
hibernation criteria.
2012-01-23 17:16:07 +01:00
Jean-Pierre André
5593ee2711 fixed clearing the end of extents when extracting metadata
When extracting the metadata, unused data at the end of MFT records is
supposed to be cleared. This was done for the base record of each file,
but not for the extent records.
2012-01-23 17:11:46 +01:00