wimlib
7 years agoUpdate NEWS, docs
Eric Biggers [Thu, 30 Aug 2012 05:06:10 +0000 (00:06 -0500)]
Update NEWS, docs

7 years agowimlib.h documentation
Eric Biggers [Thu, 30 Aug 2012 04:50:44 +0000 (23:50 -0500)]
wimlib.h documentation

7 years agoMore documentation updates
Eric Biggers [Thu, 30 Aug 2012 04:07:50 +0000 (23:07 -0500)]
More documentation updates

7 years agoMan page updates
Eric Biggers [Thu, 30 Aug 2012 02:30:01 +0000 (21:30 -0500)]
Man page updates

7 years agoimagex apply documentation
Eric Biggers [Thu, 30 Aug 2012 02:07:49 +0000 (21:07 -0500)]
imagex apply documentation

7 years agoLicense and documentation
Eric Biggers [Thu, 30 Aug 2012 00:34:12 +0000 (19:34 -0500)]
License and documentation

Change license LGPLv2.1 to GPLv3+ and begin updating documentation

7 years agoNTFS apply ADS fixes
Eric Biggers [Wed, 29 Aug 2012 22:18:17 +0000 (17:18 -0500)]
NTFS apply ADS fixes

7 years agoFix various NTFS capture issues
Eric Biggers [Wed, 29 Aug 2012 21:45:29 +0000 (16:45 -0500)]
Fix various NTFS capture issues

7 years agoRemove duplicate ntfs typedefs
Eric Biggers [Wed, 29 Aug 2012 14:17:21 +0000 (09:17 -0500)]
Remove duplicate ntfs typedefs

7 years agoAdd config.rpath (empty file)
Eric Biggers [Wed, 29 Aug 2012 13:50:19 +0000 (08:50 -0500)]
Add config.rpath (empty file)

7 years agoComments etc.
Eric Biggers [Wed, 29 Aug 2012 04:48:58 +0000 (23:48 -0500)]
Comments etc.

7 years agoBuild fixes
Eric Biggers [Wed, 29 Aug 2012 03:38:21 +0000 (22:38 -0500)]
Build fixes

Use casts to or from `uintptr_t' to avoid warnings on 32-bit platforms when we
get or set the FUSE private data in mount.c.

Make the XATTR interface optional.  Support is omitted automatically if the
setxattr() function or the `attr/xattr.h' header is not found.

Fix a couple of the test cases.

7 years agodentry.h: Don't typedef WIMStruct
Eric Biggers [Wed, 29 Aug 2012 02:50:13 +0000 (21:50 -0500)]
dentry.h: Don't typedef WIMStruct

(Avoid duplicate typedef)

7 years agoFix various issues
Eric Biggers [Wed, 29 Aug 2012 02:41:47 +0000 (21:41 -0500)]
Fix various issues

7 years agoPrint names of dentries in split link groups when in debug mode
Eric Biggers [Wed, 29 Aug 2012 01:39:18 +0000 (20:39 -0500)]
Print names of dentries in split link groups when in debug mode

7 years agoCleanups and rename dentry->hard_link to dentry->link_group_id
Eric Biggers [Wed, 29 Aug 2012 00:47:50 +0000 (19:47 -0500)]
Cleanups and rename dentry->hard_link to dentry->link_group_id

7 years agoTimestamp printing UTC
Eric Biggers [Tue, 28 Aug 2012 22:30:50 +0000 (17:30 -0500)]
Timestamp printing UTC

7 years agoHard link group disambiguation
Eric Biggers [Tue, 28 Aug 2012 19:55:41 +0000 (14:55 -0500)]
Hard link group disambiguation

7 years agoHard link disambiguation
Eric Biggers [Tue, 28 Aug 2012 19:07:21 +0000 (14:07 -0500)]
Hard link disambiguation

Will be adding more comments and doing more testing soon

7 years agoAlign security data correctly
Eric Biggers [Tue, 28 Aug 2012 05:45:14 +0000 (00:45 -0500)]
Align security data correctly

7 years agodentry_first_lte() -> dentry_unnamed_lte()
Eric Biggers [Tue, 28 Aug 2012 05:24:28 +0000 (00:24 -0500)]
dentry_first_lte() -> dentry_unnamed_lte()

This probably doesn't make a difference, but when we were looking for the
"first" lookup table entry what we really wanted was to find the lookup table
for the un-named data stream, even if it's in an alternate data stream rather
than the expected location in the dentry.

7 years agoxattr ADS fixes
Eric Biggers [Tue, 28 Aug 2012 04:59:44 +0000 (23:59 -0500)]
xattr ADS fixes

7 years agoverify_dentry()
Eric Biggers [Tue, 28 Aug 2012 04:10:26 +0000 (23:10 -0500)]
verify_dentry()

Do some more verifications on each dentry after we read them all into memory.

7 years agoDo not add lookup table entry for empty files
Eric Biggers [Tue, 28 Aug 2012 03:21:39 +0000 (22:21 -0500)]
Do not add lookup table entry for empty files

7 years agoMore ADS and dentry alignment and padding issues
Eric Biggers [Tue, 28 Aug 2012 03:12:52 +0000 (22:12 -0500)]
More ADS and dentry alignment and padding issues

So... I think that ALL the filename fields (short name, file name, stream name)
actually have a 2-byte null terminator, but NOT if that field has zero length.
This is now taken into account.

A warning is now issued if the dentry length is unexpectedly large.

We will now write all dentries with the "canonical" length regardless of what
dentry length was read in (as we are throwing out whatever junk was appended to
it anyway...).

7 years agowarning if null filename terminator is not null
Eric Biggers [Tue, 28 Aug 2012 02:00:51 +0000 (21:00 -0500)]
warning if null filename terminator is not null

7 years agoADS entry reading: minor changes
Eric Biggers [Tue, 28 Aug 2012 01:48:00 +0000 (20:48 -0500)]
ADS entry reading: minor changes

- Make sure the length field of each ADS entry makes sense.
- Allow an ADS entry at the end of the metadata resource to contain no padding
  following it (probably isn't necessary, but who knows--- best to make the code
  able to handle these weird cases).

7 years agoReviewed code in dentry.c and {read,write}_metadata_resource()
Eric Biggers [Tue, 28 Aug 2012 01:13:20 +0000 (20:13 -0500)]
Reviewed code in dentry.c and {read,write}_metadata_resource()

- Added lots of comments.
- Fix writing the metadata resource when there is security data with length that
  isn't a multiple of 8 bytes.
- write_dentry_tree() is now a wrapper around write_dentry_tree_recursive(), the
  latter of which does not need to treat the root dentry specially.

7 years agoNTFS capture updates
Eric Biggers [Mon, 27 Aug 2012 22:30:07 +0000 (17:30 -0500)]
NTFS capture updates

7 years agoimagex options
Eric Biggers [Mon, 27 Aug 2012 04:41:41 +0000 (23:41 -0500)]
imagex options

7 years agowimlib_add_image(): Fewer parameters
Eric Biggers [Mon, 27 Aug 2012 04:34:52 +0000 (23:34 -0500)]
wimlib_add_image(): Fewer parameters

No more description and flags_element parameters.  There are separate functions
to set those.

7 years agoCase insensitive exclusion pattern matching
Eric Biggers [Mon, 27 Aug 2012 03:56:12 +0000 (22:56 -0500)]
Case insensitive exclusion pattern matching

7 years agoExclusion paths updates
Eric Biggers [Mon, 27 Aug 2012 03:52:18 +0000 (22:52 -0500)]
Exclusion paths updates

- Strip drive letter if given.
- Allow paths relative to capture root to begin with a non-slash character,
  provided that they contain another slash somewhere in them (otherwise they are
  interpreted as a filename pattern).

7 years agoRelative file exclusion
Eric Biggers [Mon, 27 Aug 2012 03:45:27 +0000 (22:45 -0500)]
Relative file exclusion

File exclusion patterns are now intepreted relative to the directory of capture.

7 years agoImage capture configuration
Eric Biggers [Mon, 27 Aug 2012 03:32:09 +0000 (22:32 -0500)]
Image capture configuration

Support a capture configuration file like Microsoft's imagex.exe does.  It lets
you specify patterns of files to exclude from capture, exclude from compression,
or align within the WIM file.  Currently, only the exclusion list is
implemented.  --config options have been added to `imagex capture' and `imagex
append'.

7 years agoMisc fixes
Eric Biggers [Sun, 26 Aug 2012 23:46:47 +0000 (18:46 -0500)]
Misc fixes

- Remove code pertaining to root permissions.  We don't need to be root to do a
  NTFS apply anymore.
- Improve comments on fields of `struct dentry'.
- Another fix to hard-link creation in the NTFS apply.  We close the directory
  inode before opening the target inode and re-opening the directory inode, so
  that we can make sure the directory inode will not be opened twice at the same
  time.

7 years agoComments, function renaming
Eric Biggers [Sun, 26 Aug 2012 18:38:43 +0000 (13:38 -0500)]
Comments, function renaming

7 years agoA couple more debug statements
Eric Biggers [Sun, 26 Aug 2012 18:32:11 +0000 (13:32 -0500)]
A couple more debug statements

7 years agoMisc. fixes
Eric Biggers [Sun, 26 Aug 2012 18:19:20 +0000 (13:19 -0500)]
Misc. fixes

7 years agoNTFS capture updates (IN PROGRESS)
Eric Biggers [Sun, 26 Aug 2012 17:50:35 +0000 (12:50 -0500)]
NTFS capture updates (IN PROGRESS)

Also, add preapply_dentry_with_dos_name() function

7 years agoNTFS capture (IN PROGRESS)
Eric Biggers [Sun, 26 Aug 2012 03:31:06 +0000 (22:31 -0500)]
NTFS capture (IN PROGRESS)

7 years agoNTFS capture (IN PROGRESS)
Eric Biggers [Sun, 26 Aug 2012 02:41:01 +0000 (21:41 -0500)]
NTFS capture (IN PROGRESS)

7 years agonew_lookup_table_entry() fix
Eric Biggers [Sun, 26 Aug 2012 02:20:57 +0000 (21:20 -0500)]
new_lookup_table_entry() fix

7 years agoNTFS capture (IN PROGRESS)
Eric Biggers [Sun, 26 Aug 2012 02:12:08 +0000 (21:12 -0500)]
NTFS capture (IN PROGRESS)

7 years agoNTFS capture (IN PROGRESS)
Eric Biggers [Sun, 26 Aug 2012 00:57:46 +0000 (19:57 -0500)]
NTFS capture (IN PROGRESS)

7 years agontfs-capture.c
Eric Biggers [Sat, 25 Aug 2012 22:34:01 +0000 (17:34 -0500)]
ntfs-capture.c

Stub for ntfs_add_image_from_ntfs_volume().

7 years agoDOS names fix
Eric Biggers [Sat, 25 Aug 2012 22:18:46 +0000 (17:18 -0500)]
DOS names fix

7 years agoFix wimfs_getattr()
Eric Biggers [Sat, 25 Aug 2012 19:52:41 +0000 (14:52 -0500)]
Fix wimfs_getattr()

7 years agoNTFS apply updates
Eric Biggers [Sat, 25 Aug 2012 18:58:11 +0000 (13:58 -0500)]
NTFS apply updates

- Hard link creation code fixed and uncommented.  We need to close the source
  directory inode before the target inode.
- Code to set DOS filenames added but commented out due to a problem.
- New function wim_apply_dentry_timestamps() to apply timestamps to dentry, run
  in a depth-first traversal of the directory tree following the main WIM
  application.

7 years agoImplement XATTR interface to ADS in wimfs
Eric Biggers [Sat, 25 Aug 2012 05:13:31 +0000 (00:13 -0500)]
Implement XATTR interface to ADS in wimfs

7 years agoFixes for Windows ADS interface
Eric Biggers [Sat, 25 Aug 2012 04:02:34 +0000 (23:02 -0500)]
Fixes for Windows ADS interface

7 years agoNTFS apply fixes
Eric Biggers [Fri, 24 Aug 2012 22:17:45 +0000 (17:17 -0500)]
NTFS apply fixes

Minor fixes

Also, comment out hard link creation code until a problem is fixed

7 years agoInclude _ntfs_valid_descr()
Eric Biggers [Fri, 24 Aug 2012 21:18:52 +0000 (16:18 -0500)]
Include _ntfs_valid_descr()

Patch the ntfs_valid_descr() function from libntfs-3g to allow security
descriptors that end with an empty SACL

7 years agoExtract NTFS junction points correctly
Eric Biggers [Fri, 24 Aug 2012 04:22:36 +0000 (23:22 -0500)]
Extract NTFS junction points correctly

They need to be made as directories not regular files.

7 years agoNTFS apply updates
Eric Biggers [Fri, 24 Aug 2012 03:23:33 +0000 (22:23 -0500)]
NTFS apply updates

- Apply data streams, including all alternate data streams
- Set reparse data correctly

7 years agoDefault to XPRESS compression
Eric Biggers [Fri, 24 Aug 2012 01:43:23 +0000 (20:43 -0500)]
Default to XPRESS compression

7 years agoComments
Eric Biggers [Fri, 24 Aug 2012 01:39:35 +0000 (20:39 -0500)]
Comments

7 years agoCode to handle some weird siutations and bad WIMs
Eric Biggers [Fri, 24 Aug 2012 00:44:42 +0000 (19:44 -0500)]
Code to handle some weird siutations and bad WIMs

- read_lookup_table():  It is now an error if uncompressed resources have
  different compressed and uncompressed size.
- read_lookup_table(): It is now an error if two lookup table entries have the
  same SHA1 message digest.
- write_metadata_resource(): Append 20 random bytes to the end of the metadata
  resource to make the metadata resource unique even if we capture exactly the
  same image again.

7 years agoMore comments
Eric Biggers [Thu, 23 Aug 2012 21:57:02 +0000 (16:57 -0500)]
More comments

Also calculate hash in write_wim_resource_from_buffer() and not
write_metadata_resource() to avoid redundant SHA1 calculations

7 years agoComments; check SHA1 md in extract_wim_resource_to_fd()
Eric Biggers [Thu, 23 Aug 2012 19:55:19 +0000 (14:55 -0500)]
Comments; check SHA1 md in extract_wim_resource_to_fd()

7 years agoFinally fixed most of the problems with the new resource code.
Eric Biggers [Thu, 23 Aug 2012 14:50:42 +0000 (09:50 -0500)]
Finally fixed most of the problems with the new resource code.

Also, write_wim_resource() will now verify the SHA1 message digest when writing
a WIM resource.  This makes it possible to detect concurrent modifications of
the directory tree when capturing a WIM.

7 years agoResource fixes/changes
Eric Biggers [Thu, 23 Aug 2012 03:11:32 +0000 (22:11 -0500)]
Resource fixes/changes

Fixes to the new WIM resource code

Also, write a resource uncompressed when the compressed resource is larger than
the uncompressed resource.

7 years agoPartial fixes and comments
Eric Biggers [Wed, 22 Aug 2012 05:55:58 +0000 (00:55 -0500)]
Partial fixes and comments

7 years agoRewritten functions for reading and writing resources
Eric Biggers [Wed, 22 Aug 2012 04:40:57 +0000 (23:40 -0500)]
Rewritten functions for reading and writing resources

Functions for reading and writing compressed and uncompressed resources have
been rewritten to reduce code duplication and simplify the interface to the rest
of the code.

Not yet tested and commented.

7 years agoComments; NTFS hardlinks
Eric Biggers [Tue, 21 Aug 2012 23:26:03 +0000 (18:26 -0500)]
Comments; NTFS hardlinks

7 years agontfs.c => ntfs-apply.c
Eric Biggers [Tue, 21 Aug 2012 22:48:01 +0000 (17:48 -0500)]
ntfs.c => ntfs-apply.c

7 years agoAdd modified security.c from NTFS-3g
Eric Biggers [Tue, 21 Aug 2012 22:17:36 +0000 (17:17 -0500)]
Add modified security.c from NTFS-3g

This simplifies WIM application because we can modifiy
ntfs_set_file_attributes() and ntfs_set_file_security() to take ntfs_inodes
instead of pathnodes, and we can also get rid of the SECURITY_API structure.

7 years agoWrite NTFS data streams (IN PROGRESS)
Eric Biggers [Tue, 21 Aug 2012 18:04:08 +0000 (13:04 -0500)]
Write NTFS data streams (IN PROGRESS)

7 years agoNTFS apply (IN PROGRESS)
Eric Biggers [Tue, 21 Aug 2012 17:31:29 +0000 (12:31 -0500)]
NTFS apply (IN PROGRESS)

7 years agontfs_apply_dentry() (IN PROGRESS)
Eric Biggers [Tue, 21 Aug 2012 05:11:47 +0000 (00:11 -0500)]
ntfs_apply_dentry() (IN PROGRESS)

7 years agowimlib_apply_image_to_ntfs_volume() API function
Eric Biggers [Tue, 21 Aug 2012 03:35:55 +0000 (22:35 -0500)]
wimlib_apply_image_to_ntfs_volume() API function

7 years agoNTFS mount(to be removed)
Eric Biggers [Tue, 21 Aug 2012 03:14:17 +0000 (22:14 -0500)]
NTFS mount(to be removed)

7 years agomkntfs, ntfs-3g in imagex
Eric Biggers [Tue, 21 Aug 2012 02:18:15 +0000 (21:18 -0500)]
mkntfs, ntfs-3g in imagex

7 years agoVarious fixes
Eric Biggers [Tue, 21 Aug 2012 01:20:29 +0000 (20:20 -0500)]
Various fixes

7 years agoApply timestamps correctly when extracting WIM image
Eric Biggers [Tue, 21 Aug 2012 00:04:06 +0000 (19:04 -0500)]
Apply timestamps correctly when extracting WIM image

7 years agoMore timestamp changes: Set timestamp on extracted files
Eric Biggers [Mon, 20 Aug 2012 23:40:53 +0000 (18:40 -0500)]
More timestamp changes: Set timestamp on extracted files

7 years agoMore accurate timestamps
Eric Biggers [Mon, 20 Aug 2012 23:04:51 +0000 (18:04 -0500)]
More accurate timestamps

7 years agoVarious fixes
Eric Biggers [Mon, 20 Aug 2012 22:27:14 +0000 (17:27 -0500)]
Various fixes

7 years agoMake lookup table use hlist
Eric Biggers [Mon, 20 Aug 2012 19:39:30 +0000 (14:39 -0500)]
Make lookup table use hlist

7 years agodentry_set_symlink_buf() fix
Eric Biggers [Mon, 20 Aug 2012 17:31:46 +0000 (12:31 -0500)]
dentry_set_symlink_buf() fix

7 years agoFixes
Eric Biggers [Mon, 20 Aug 2012 17:24:46 +0000 (12:24 -0500)]
Fixes

- Fix lte_decrement_refcnt() assertion
- Assign inode numbers to new directories

7 years agoVarious cleanups
Eric Biggers [Mon, 20 Aug 2012 17:21:38 +0000 (12:21 -0500)]
Various cleanups

7 years agoAdd list.h to git
Eric Biggers [Mon, 20 Aug 2012 07:42:10 +0000 (02:42 -0500)]
Add list.h to git

7 years agoFixes
Eric Biggers [Mon, 20 Aug 2012 07:41:15 +0000 (02:41 -0500)]
Fixes

7 years agocalculate_sha1sum_of_staging_file
Eric Biggers [Mon, 20 Aug 2012 07:05:55 +0000 (02:05 -0500)]
calculate_sha1sum_of_staging_file

7 years agopre-resolve streams (IN PROGRESS)
Eric Biggers [Mon, 20 Aug 2012 06:05:57 +0000 (01:05 -0500)]
pre-resolve streams (IN PROGRESS)

7 years agolink_group_set_stream_hash(), staging_list
Eric Biggers [Mon, 20 Aug 2012 03:49:08 +0000 (22:49 -0500)]
link_group_set_stream_hash(), staging_list

7 years ago--hardlink fix
Eric Biggers [Mon, 20 Aug 2012 02:45:41 +0000 (21:45 -0500)]
--hardlink fix

7 years agoExtract WIM hard links correctly
Eric Biggers [Mon, 20 Aug 2012 00:39:51 +0000 (19:39 -0500)]
Extract WIM hard links correctly

7 years agoget rid of make_output_dir() by extracting root dentry
Eric Biggers [Sun, 19 Aug 2012 23:24:34 +0000 (18:24 -0500)]
get rid of make_output_dir() by extracting root dentry

7 years agoHard link fix
Eric Biggers [Sun, 19 Aug 2012 22:32:15 +0000 (17:32 -0500)]
Hard link fix

I'm noticing weird things in the Windows 7 install.wim file where WIM dentries
are marked as being in the same hard link set, but the dentries have differences
such as different file streams or different file permissions.  I'm working
around the problem by splitting these offending dentries into their own hard
link groups.

7 years agoremove WIMStruct->output_dir
Eric Biggers [Sun, 19 Aug 2012 22:08:25 +0000 (17:08 -0500)]
remove WIMStruct->output_dir

7 years agowimfs_fallocate(), xattr stubs
Eric Biggers [Sun, 19 Aug 2012 21:47:09 +0000 (16:47 -0500)]
wimfs_fallocate(), xattr stubs

7 years agowimfs_write(), dentry_to_stbuf()
Eric Biggers [Sun, 19 Aug 2012 21:35:08 +0000 (16:35 -0500)]
wimfs_write(), dentry_to_stbuf()

7 years agouse_ino mount option
Eric Biggers [Sun, 19 Aug 2012 18:07:37 +0000 (13:07 -0500)]
use_ino mount option

7 years agoVarious fixes
Eric Biggers [Sun, 19 Aug 2012 17:11:44 +0000 (12:11 -0500)]
Various fixes

7 years agohardlink fixes
Eric Biggers [Sun, 19 Aug 2012 07:32:33 +0000 (02:32 -0500)]
hardlink fixes

7 years agosymlink fixes
Eric Biggers [Sun, 19 Aug 2012 07:14:21 +0000 (02:14 -0500)]
symlink fixes

7 years agoclone_dentry(): Set name fields to NULL
Eric Biggers [Sun, 19 Aug 2012 07:00:20 +0000 (02:00 -0500)]
clone_dentry(): Set name fields to NULL

7 years agowimfs_link(), wimfs_symlink(), symlink fixes
Eric Biggers [Sun, 19 Aug 2012 06:55:03 +0000 (01:55 -0500)]
wimfs_link(), wimfs_symlink(), symlink fixes