Eric Biggers [Sun, 2 Sep 2012 19:33:26 +0000 (14:33 -0500)]
Make WIM mounting work on FreeBSD
- Fallback to `umount' if `fusermount' is not available.
- Place message in message queue before executing `umount'. This is needed in
case the unmount occurs synchronously.
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.
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...).
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).
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.
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).
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'.
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.