Commit Graph

53 Commits (0911ef206dc8fea68e18282a1ee5f4489cf0ca1d)

Author SHA1 Message Date
Jean-Pierre André 0911ef206d Rejected negative data length in an attribute list
The negative data length of an attribute list is an indication of a
probable corruption and must be rejected.
2021-07-19 09:23:23 +02:00
Jean-Pierre André 37a330ea8c Improved the consistency checks of standard information
Make sure the standard information attribute has a valid size.
2021-05-17 15:39:13 +03:00
Jean-Pierre André 1ea2003e96 Realigned times set from extended attribute
The alignment of times set in an extended attribute value cannot be
asserted, and this cause alignment errors on some CPUs (met on ARM).
Be safe by copying them in a properly aligned array.
2018-12-19 15:48:03 +01:00
Jean-Pierre André 163635f08f Fixed displaying an inode number in an error message
In an error message, the inode number was displayed in decimal without
taking off its generation number, making it difficult to interpret.
2018-02-13 08:47:00 +01:00
Jean-Pierre André 043b0e6e73 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>
2016-07-28 16:13:59 +02:00
Erik Larsson 9cf04fd2cd Fix incorrect usage of native/little-endian types, signed types, etc.
This is harmless with regard to code generation but if we turn on strict
type checking these type mismatches will result in errors.
2015-12-21 23:55:31 +01:00
Erik Larsson dfa4a6647f Fix code to use const_cpu_to_X/const_X_to_cpu macros for constants.
This enables the compiler to optimize this code in cases where compiler
support for endianness swapping is not present.
2015-12-21 23:21:00 +01:00
Jean-Pierre André 0b827cc978 Avoid endless recursion when MFT extents are described in themselves
When getting extents of MFT, we must be sure they are in the MFT part which
has already been mapped, otherwise we fall into an endless recursion.

Situations have been met where extents locations are described in themselves,
as a consequence of a bug, probably unrelated to ntfs-3g.
This is a severe error which chkdsk cannot fix.
2011-08-30 15:56:36 +02:00
Jean-Pierre André 5cd49257b0 Removed unneeded variables as warned by gcc 4.6 2011-07-05 12:17:29 +02:00
Jean-Pierre André 6bf4af7544 Fixed allocated size when an attribute update causes unnamed data to be expelled 2011-01-10 11:18:16 +01:00
Jean-Pierre André 9b2ecca3df Do not record inode open when failed (debug only) 2011-01-10 11:16:39 +01:00
Jean-Pierre André 1bdd93e237 Fixed setting reparse tags in parent directories 2010-02-17 21:26:40 +01:00
jpandre d78add4e8f Developed time stamping up to 100ns resolution 2010-01-04 08:24:44 +00:00
jpandre 6271663b4e Skip extended attribute related functions when not supported locally 2009-12-19 09:20:59 +00:00
jpandre d75f69d80e Cached inode data for subsequent use 2009-12-18 08:12:23 +00:00
jpandre 7c88ccb95b Grouped parameters affecting the global behavior in a specific file 2009-12-17 15:24:02 +00:00
jpandre d990f7996c Changed the interfaces to use extended attributes 2009-12-17 08:24:13 +00:00
jpandre 758a99ea87 Avoided double copy of dir when closing a file in an open dir 2009-12-10 10:04:53 +00:00
jpandre 20fb2395fd Simplified tracking of forced time stamps 2009-11-26 13:34:42 +00:00
jpandre 22ecdf8298 Fixed synchronization of attribs and timestamps to parent directory 2009-11-25 14:37:00 +00:00
jpandre 9901ea3532 ntfs_inode_open: don't log "No STANDARD_INFORMATION" for extended MFT records 2009-11-05 11:44:38 +00:00
jpandre af4f6a406a fix format breaking new lines in error messages 2009-11-05 11:43:36 +00:00
jpandre 61f7084020 Fixed avoidance of a double opening of an inode in create() 2009-09-18 19:51:10 +00:00
jpandre 12437acea9 Avoided a double opening of an inode in create() 2009-09-18 16:31:46 +00:00
jpandre 5e650c0c91 Developped getting and setting NTFS times 2009-07-09 15:20:14 +00:00
jpandre 2a1d75a3da Adapted to ntfs-3g.2009.3.8 2009-03-27 09:10:00 +00:00
jpandre cd4b23f0a6 Fixed an endianness error 2009-03-27 08:46:19 +00:00
jpandre 5689ebd55d Fixed endianness errors 2009-03-23 16:05:11 +00:00
jpandre 93b695f1cc Adapted to ntfs-3g-2009.2.1 2009-02-12 20:32:21 +00:00
jpandre e5286c09d6 Adapted to ntfs-3g.1.2926-RC 2008-09-19 13:39:38 +00:00
jpandre 08537782ce Reset errno to previous value when it does not mean an error 2008-08-30 10:55:33 +00:00
jpandre 499e106341 Adapted to ntfs-3g.1.2812 2008-08-16 15:17:47 +00:00
szaka a6d8c6b1a6 new: use tabulated logging; add ntfs_log_enter() and ntfs_log_leave()
and convert the most commonly used functions
2008-06-30 00:13:23 +00:00
szaka 1098244bbf copyright update 2008-06-29 23:13:32 +00:00
jpandre bd86c2e445 Adjusted to v 1.1120 2007-11-20 11:03:57 +00:00
szaka 906637db9e posix file time updates (Yura Pakhuchiy, Szabolcs Szakacsits) 2007-11-13 00:11:51 +00:00
jpandre a8dc8655d0 Adjusted to v 1.1030 2007-10-29 16:28:33 +00:00
jpandre 8a210f7776 Cleaned code

							
						
2007-10-09 07:37:07 +00:00
jpandre 492dbcbe9e Checked consistency of standard information size and v3_Extensions flag 2007-10-06 14:41:23 +00:00
jpandre 99b4aba970 *** empty log message *** 2007-09-27 13:29:52 +00:00
szaka d2fab4e71f fix: utimes() shouldn't update the parent dir mtime (Wayne Sherman, Szaka) 2007-08-10 15:01:21 +00:00
szaka a7e4d503e2 fix: rename may updated mtime for some files/dirs (Wayne Sherman, Szaka) 2007-08-09 14:11:54 +00:00
szaka ac23ed59c5 add ntfs_inode_base() helper 2007-07-20 21:43:39 +00:00
szaka 2cc87f0c78 ntfs_extent_inode_open: log all errors 2007-07-20 21:26:24 +00:00
szaka f6b2f6f98f ntfs_inode_free_space(): log all errors 2007-07-13 23:35:08 +00:00
szaka 9a8a59e136 ntfs_inode_add_attrlist(): log all errors 2007-07-13 22:42:35 +00:00
szaka 0cee6bc4bb remove redundant ntfs_attr_get_search_ctx() error logging 2007-07-13 20:05:48 +00:00
szaka 7b02774d67 __ntfs_inode_release(): void function, don't return error 2007-06-04 23:00:06 +00:00
szaka 4a16f5a200 ntfs_inode_sync_file_name(): log errors 2007-06-04 22:58:41 +00:00
szaka 4a38929051 ntfs_inode_close(), __ntfs_inode_release(): log errors 2007-06-04 21:32:30 +00:00