From 65477d4b855fc5b351e7e599e12ec2c90017b12a Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 26 Dec 2016 15:14:41 -0600 Subject: [PATCH] Document xattr support --- doc/man1/wimlib-imagex-apply.1 | 6 ++--- doc/man1/wimlib-imagex-capture.1 | 23 +++++++++--------- doc/man1/wimlib-imagex-mount.1 | 40 ++++++++++++++++---------------- include/wimlib.h | 10 ++++---- 4 files changed, 39 insertions(+), 40 deletions(-) diff --git a/doc/man1/wimlib-imagex-apply.1 b/doc/man1/wimlib-imagex-apply.1 index 4e8bc8d8..48865ba8 100644 --- a/doc/man1/wimlib-imagex-apply.1 +++ b/doc/man1/wimlib-imagex-apply.1 @@ -299,9 +299,9 @@ UNIX-like systems. \fB--unix-data\fR (UNIX-like systems only) Restore UNIX owners, groups, modes, and device IDs (major and minor numbers) that were captured by \fBwimlib-imagex capture\fR with -the \fB--unix-data\fR option. Since wimlib v1.7.0, you can backup and restore -not only the standard UNIX file permission information, but also character -device nodes, block device nodes, named pipes (FIFOs), and UNIX domain sockets. +the \fB--unix-data\fR option. Since wimlib v1.7.0, device nodes, named pipes, +and socket files are also restored correctly. Since wimlib v1.11.0, on Linux +extended attributes are also restored. .TP \fB--no-acls\fR Do not restore security descriptors on extracted files and directories. diff --git a/doc/man1/wimlib-imagex-capture.1 b/doc/man1/wimlib-imagex-capture.1 index e112fca9..f254ca70 100644 --- a/doc/man1/wimlib-imagex-capture.1 +++ b/doc/man1/wimlib-imagex-capture.1 @@ -67,9 +67,10 @@ nanosecond granularity With \fB--unix-data\fR: UNIX owners, groups, and modes .IP \[bu] With \fB--unix-data\fR: device nodes, FIFOs, and UNIX domain sockets +.IP \[bu] +With \fB--unix-data\fR: extended attributes (since wimlib v1.11.0, Linux only) .PP -There is no support for storing extended attributes (e.g. SELinux security -labels and POSIX ACLs), last status change times (ctimes), or hard link +There is no support for storing last status change times (ctimes), or hard link information for symbolic link files (each symbolic link will be stored as an independent file). In addition, filenames and symbolic link targets on UNIX filesystems which are not valid UTF-8 with the addition of surrogate codepoints @@ -387,17 +388,15 @@ that may be present on the filesystem. .TP \fB--unix-data\fR (UNIX-like systems only) Store the UNIX owner, group, mode, and device ID (major -and minor number) of each captured file. Since wimlib v1.7.0, you can backup -and restore not only the standard UNIX file permission information, but also -character device nodes, block device nodes, named pipes (FIFOs), and UNIX domain -sockets. +and minor number) of each stored file. Device nodes, named pipes, and socket +files are also stored. Since wimlib v1.11.0, on Linux extended attributes are +also stored. .IP -wimlib stores UNIX data by adding a special tagged metadata item to each -directory entry of each file that contains this information. This extra -information is ignored by the Microsoft implementation. Note: UNIX data stored -by wimlib before v1.7.0 used a different format that is no longer supported. If -you have old WIM files with UNIX data, apply them with v1.6.2 and recapture them -with v1.7.0 or later. +wimlib stores this UNIX-specific metadata in tagged metadata items. These items +are ignored by Microsoft's WIM software. Note: UNIX metadata stored by wimlib +before v1.7.0 used a different format that is no longer supported. If you have +old WIM files with UNIX metadata, apply them with v1.6.2 and recapture them with +v1.7.0 or later. .TP \fB--no-acls\fR Do not capture files' security descriptors. diff --git a/doc/man1/wimlib-imagex-mount.1 b/doc/man1/wimlib-imagex-mount.1 index b5b6c630..da952eb2 100644 --- a/doc/man1/wimlib-imagex-mount.1 +++ b/doc/man1/wimlib-imagex-mount.1 @@ -25,11 +25,10 @@ The WIM image can be unmounted using the \fBwimlib-imagex unmount\fR command. Changes made to a WIM mounted read-write will be discarded unless the \fB--commit\fR flag is provided to \fBwimlib-imagex unmount\fR. .SH DATA AND METADATA SUPPORT -This section documents which WIM features are exposed via the mount support and -which are not. -.PP -The following features are \fIsupported\fR (read/write unless otherwise -specified): +WIM images can contain a variety of types of files and file metadata, some of +which is Windows-specific. Currently, the mount commands can translate some, +but not all, Windows concepts to Linux equivalents. Briefly, the following +features are \fIsupported\fR (read/write): .IP \[bu] 4 Hard links .IP \[bu] @@ -40,29 +39,30 @@ directory. UNIX symbolic links created in a read-write mounted WIM image will automatically be translated into native Windows symbolic links. .IP \[bu] Named data streams (mostly). See the \fB--streams-interface\fR option. -.IP \[bu] -Standard UNIX permission bits and UNIX special files are supported if the -\fB--unix-data\fR option is used. .PP -The following features are \fIunsupported\fR: +In addition, standard UNIX owners, groups, modes, and special files are +supported if the \fB--unix-data\fR option is used. +.PP +However, the following features are \fIunsupported\fR (not exposed in mounted +images; existing values are preserved on commit): .IP \[bu] 4 -Windows security descriptors. These are not exposed in the mounted filesystem, -although existing values will be preserved on commit. New files are not given -security descriptors. +Windows security descriptors. New files are not given security descriptors. .IP \[bu] -DOS names (8.3 names) (short names). These are not exposed in the mounted -filesystem, although existing values will be preserved on commit. New files are -not given DOS names. +DOS names (8.3 names) (short names). New files are not given DOS names. .IP \[bu] -Windows file attributes. These are not exposed in the mounted filesystem, -although existing values will be preserved on commit. New files are assigned -default attributes based on the UNIX file mode bits. +Windows file attributes. New files are assigned default attributes based on the +UNIX file mode bits. .IP \[bu] -Object IDs. These are not exposed in the mounted filesystem, although existing -values will be preserved on commit. New files are not given object IDs. +Object IDs. New files are not given object IDs. .IP \[bu] EFS-encrypted files. The files themselves will be visible in mounted WIM images but their data will not be available. +.IP \[bu] +Extended attributes. Although wimlib now supports creating a WIM image +containing Linux-style extended attributes, these are not yet exposed in mounted +WIM images. (This may be implemented in the future, though it would potentially +conflict with the use of extended attributes to expose Windows concepts like +named data streams.) .SH SPLIT WIMS You may use \fBwimlib-imagex mount\fR to mount an image from a split WIM read-only. However, you may not mount an image from a split WIM read-write. diff --git a/include/wimlib.h b/include/wimlib.h index 8d397808..8f6a8778 100644 --- a/include/wimlib.h +++ b/include/wimlib.h @@ -1706,8 +1706,9 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour /** UNIX-like systems only: Store the UNIX owner, group, mode, and device ID * (major and minor number) of each file. In addition, capture special files - * such as device nodes and FIFOs. See the documentation for the - * --unix-data option to wimcapture for more information. */ + * such as device nodes and FIFOs. Since wimlib v1.11.0, on Linux also capture + * extended attributes. See the documentation for the --unix-data option + * to wimcapture for more information. */ #define WIMLIB_ADD_FLAG_UNIX_DATA 0x00000010 /** Do not capture security descriptors. Only has an effect in NTFS-3G capture @@ -1899,7 +1900,7 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour * wimlib_extract_paths() when passed multiple paths. */ #define WIMLIB_EXTRACT_FLAG_NTFS 0x00000001 -/** UNIX-like systems only: Extract special UNIX data captured with +/** UNIX-like systems only: Extract UNIX-specific metadata captured with * ::WIMLIB_ADD_FLAG_UNIX_DATA. This flag cannot be combined with * ::WIMLIB_EXTRACT_FLAG_NTFS. */ #define WIMLIB_EXTRACT_FLAG_UNIX_DATA 0x00000020 @@ -2061,8 +2062,7 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour * name, a colon, then the name of the data stream. */ #define WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_WINDOWS 0x00000010 -/** Use UNIX metadata if available in the WIM image. See - * ::WIMLIB_ADD_FLAG_UNIX_DATA. */ +/** Use UNIX owners, groups, and modes if available in the WIM image. */ #define WIMLIB_MOUNT_FLAG_UNIX_DATA 0x00000020 /** Allow other users to see the mounted filesystem. This passes the @c -- 2.43.0