Commit Graph

750 Commits (391929cff3acfccc2be39c29046ece2c20b0fd02)

Author SHA1 Message Date
Yura Pakhuchiy 391929cff3 Export NTFS_EFS string 2007-08-22 19:31:24 +03:00
Yura Pakhuchiy ad0c5f59c9 Transparently integrate reading of encrypted files into library
This adds crypto.[ch], several exported functions that you are not interested
to use and dependency on >=libconfig-1.0.1 to read list of PFX files with keys.
See libntfs/config for example configuration file.
2007-08-22 16:55:57 +03:00
Yura Pakhuchiy 09affc5d42 Whitespaces cleanup 2007-07-31 20:52:36 +03:00
Yura Pakhuchiy ea4d352f7e Fix sparse warnings from git HEAD version 2007-07-21 22:01:57 +03:00
Yura Pakhuchiy 311ecc507e Memleak 2007-07-21 15:11:42 +03:00
Yura Pakhuchiy 7a68bb3ea0 Endian fixes for gnome-vfs module. Thanks to Anton for tip. 2007-06-10 14:30:41 +03:00
Yura Pakhuchiy 0d264b7d25 Introduce sparse endian annotations. Adopt library (also fix 2 real bugs) and progs (lots of bugs). 2007-06-08 13:47:57 +03:00
Yura Pakhuchiy 48c336fd6a O(1) mapping pairs update for normal files 2007-06-08 13:45:28 +03:00
Yura Pakhuchiy b99d331f78 We do not need to map whole runlist in this case, only until @pos. Introduce ntfs_attr_map_runlist_range to implement this. 2007-06-08 13:41:10 +03:00
Yura Pakhuchiy e404ce8203 Fix 64bit warnings (Yuval) 2007-06-08 13:36:37 +03:00
Yura Pakhuchiy e6620be16d Do not create holes in ntfs_attr_pwrite that will be instantiated right after creation
* Add new API: __ntfs_attr_truncate that allow user to select whether holes should be created or clusters allocated
* Update ntfs_attr_pwrite and ntfscp to use it.
2007-06-08 13:35:47 +03:00
yura 48399b98b3 cleanup 2007-03-13 18:45:51 +00:00
aia21 f6adc3fc78 - mkntfs: Create more Vista like volumes. We now match the security
descriptor attributes (but not yet the security descriptors stored in
  $Secure).  (Anton)
- libntfs: Rewrite ntfs_upcase_table_build() to generate a Vista
  compatible upcase table ($UpCase).  (Anton)
- mkntfs: Remove own generation of upcase table, i.e. delete
  ntfsprogs/upcase.[ch] and use ntfs_upcase_table_build() supplied by
  libntfs.  (Anton)
2006-12-19 16:31:52 +00:00
yura 3c668b7d03 - O_EXCL already handled by MNT_NOT_EXCLUSIVE at more early stage
- fix comments
2006-12-15 17:00:02 +00:00
aia21 1fa522a0a1 - libntfs: Add support for FreeBSD 5.0+ sector aligned access
requirements.  (Max Khon)

With some modifications from me...
2006-12-15 15:21:27 +00:00
aia21 1a4fb3431c - mkntfs: Generate a random DCE compliant UUID for the created volume
and include --with-uuid[=PFX] and --without-uuid options.  (Anton)
- configure.ac: Set language to C.  (Anton)
- mkntfs: Always set default cluster size to 4096 bytes regardless of
  volume size.  This is what Windows Vista does and it makes perfect
  sense from a performance point of view.  (Anton)
2006-12-13 00:11:50 +00:00
yura 10b22550cd more sparse fixes
left only endianness and this stupid problems with s64
2006-12-12 19:00:00 +00:00
yura 7b60afcc2f fix sparse errors. and first steps towards endianness checking 2006-12-12 15:02:25 +00:00
yura 2b611a1461 fix clusters per index block calculation (Szaka) 2006-12-11 03:16:22 +00:00
yura 19089b08bd one place with mount option description 2006-12-11 03:03:30 +00:00
yura 03fabce6eb o fix magicNTFS defenition
o remove NTFS_SB_MAGIC because it is unusefull
o rename magicNTFS -> NTFS_SB_MAGIC
o make bootsect.c use NTFS_SB_MAGIC instead of hardcoded value
2006-12-11 03:02:23 +00:00
aia21 43b61b82e7 If pread/pwrite are not supported by the OS, set the device pread()/pwrite()
pointers to NULL so we automatically use seek() + read()/write() from now on.
2006-12-10 19:38:02 +00:00
aia21 f73d77d568 - Implement ntfs_pread() and ntfs_pwrite() in terms of device
operations pread() and pwrite() respectively and fall back to using
  seek() + read()/write() if no pread()/pwrite() device operation is
  supplied or the OS does not support the pread()/pwrite() system call.
  Adapt unix_io pread()/pwrite() device operations to use pread()/
  pwrite() system call and adapt win32_io device operations to not
  supply pread()/pwrite().  (Csaba Henk, Anton)
2006-12-09 14:01:12 +00:00
yura c475778b47 Turn ntfs_pathname_to_inode() into ntfs_pathname_to_inode_num() which
returns ntfs inode number instead of opened inode itself.
Reimplement ntfs_pathname_to_inode() as wrapper to new API.
2006-12-06 18:50:13 +00:00
aia21 5302d23f7b - Empty the journal at mount time. (Anton)
- Set the volume dirty bit at mount time (if it is not set already and
  clear it again at umount time but only if it was not set to start
  with.  (Anton)
2006-11-28 10:09:56 +00:00
yura f738f39bdf oops, introduced stupiedness during one of recent cleanups 2006-11-25 21:35:39 +00:00
yura f12f4aefb7 ntfs_log_error("Failed.\n") is evil. TODO: Implement ntfs_log_errortrace 2006-11-25 21:10:35 +00:00
yura 8df298aec2 Introduce MNT_NTFS_NOT_EXCLUSIVE mount option that tells libntfs do
not open volume exclusively. Useful if libntfs user cares about this
himself, eg. FUSE with blkdev option.
2006-11-25 17:37:37 +00:00
yura 668780d84d bot more verbose debug 2006-11-25 14:28:47 +00:00
yura 18c8f75c7b make ntfs_attr_rm to always close attribute (both on success and failure) 2006-11-22 18:28:13 +00:00
yura c14589175f apply latest fixes from ntfs-3g to enddianess
now everything should work on BE machines!
2006-11-20 17:44:36 +00:00
yura 0da86b6723 port from ntfs-3g fixes to error cases in index code 2006-11-20 17:30:13 +00:00
yura a604622314 Windows cares only about first 4 records in $MFTMirr and ignores
everything beyond them. Update libntfs behaviour to be like in
windows. Leave @mftmirr_size for case if will want to change something in the
future.
2006-11-20 16:21:57 +00:00
yura ef66794423 cleanups 2006-11-20 15:59:14 +00:00
yura f7fe727b09 80 chars lines long fixes 2006-11-19 20:19:18 +00:00
yura b33658bc61 cleanups 2006-11-17 22:51:29 +00:00
yura 7d1016fe97 Treat filenames in POSIX namespace as case insensitive in case of case insensitive mounts. 2006-11-15 23:15:17 +00:00
yura cb27c9f616 * Rename MS_{RDONLY,NOATIME} to NTFS_MNT_{RDONLY,NOATIME}.

							
						
2006-11-12 22:46:50 +00:00
yura 28f24fbc2c revert factoring out ntfs_attr_fill_hole(), agree that it should be refactored,
but passing all args as pointers and changing them there (especially
update_from that changes only inside new function, but rollback depends on it
in pwrite)
2006-11-10 16:07:45 +00:00
yura f2e1ff96d2 Spent really a lot of time applying various "optimizations" from ntfs-3g and
finally figured out that ntfs-3g is faster than ntfsmount only because of
3 reasons:
1) turned on noatime option by default
2) ntfs-3g builds without debug output by default
3) the only real optimization: almost always add resident attributes.
However by accident patch in ntfs-3g for 3) breaks several code paths (why
I am not surprised?), thus I rewrote whole ntfs_attr_add() logic.
2006-11-09 21:19:11 +00:00
aia21 025f07a269 Make a little nicer. 2006-11-07 10:37:25 +00:00
yura d556675a29 Fix typo and build with disabled error handling 2006-11-06 17:11:02 +00:00
uvman 76fc32ed87 Fix a memleak. (Szaka) 2006-11-01 22:37:31 +00:00
uvman be6b5ce977 Factor ntfs_attr_fill_hole() out of ntfs_attr_pwrite(). (Szaka) 2006-11-01 20:20:18 +00:00
uvman 1598a68d67 Fix compilation on environments that one can not assign to "va_list args" (e.g. Debian Alpha). Do so by removing the unused log_reason code. Originally, Szaka asked FlatCap for it but never used it. I've asked Szaka if he is going to use it but he did not reply. I got an implicit answer in the form of ntfs-3g commit. Therefore, commit an updated version of the patch I've sent the Debian package maintainer. 2006-11-01 14:05:09 +00:00
uvman 7d585a0327 Change callers of malloc() to ntfs_malloc() (Szaka). Fix compilition (Yuval). 2006-11-01 13:30:40 +00:00
uvman 483522ec1f Introduce misc.c - Proud home of functions with no other home, starting with ntfs_[mc]alloc. (Szaka) 2006-11-01 12:31:11 +00:00
uvman f6d6db57db Fix wrong error logic that would lead to segfault when malloc fails. 2006-10-30 19:40:56 +00:00
uvman 3e3196133c Avoid a memory leak on the error code path. 2006-10-30 13:43:09 +00:00
uvman 22108e36a1 More big-endiness fixes. (zhanglinbao, Yuval) 2006-10-30 13:29:45 +00:00