diff options
author | Jan Kara <jack@suse.cz> | 2019-08-29 15:11:54 +0300 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2019-09-04 19:19:25 +0300 |
commit | 2dee5aac05565933c5bf6ad4acd4f9bcd6ea2ff7 (patch) | |
tree | c2658834b67964da21a1be9cb47e21234b4da369 /fs/udf/ecma_167.h | |
parent | c3367a1b47d590f97109cd4b5189e750fb26c0f1 (diff) | |
download | linux-2dee5aac05565933c5bf6ad4acd4f9bcd6ea2ff7.tar.xz |
udf: Verify domain identifier fields
OSTA UDF standard defines that domain identifier in logical volume
descriptor and file set descriptor should contain a particular string
and the identifier suffix contains flags possibly making media
write-protected. Verify these constraints and allow only read-only mount
if they are not met.
Tested-by: Steven J. Magnani <steve@digidescorp.com>
Reviewed-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/ecma_167.h')
-rw-r--r-- | fs/udf/ecma_167.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/udf/ecma_167.h b/fs/udf/ecma_167.h index 9f24bd1a9f44..fb7f2c7bec9c 100644 --- a/fs/udf/ecma_167.h +++ b/fs/udf/ecma_167.h @@ -88,6 +88,20 @@ struct regid { #define ENTITYID_FLAGS_DIRTY 0x00 #define ENTITYID_FLAGS_PROTECTED 0x01 +/* OSTA UDF 2.1.5.2 */ +#define UDF_ID_COMPLIANT "*OSTA UDF Compliant" + +/* OSTA UDF 2.1.5.3 */ +struct domainEntityIDSuffix { + uint16_t revision; + uint8_t flags; + uint8_t reserved[5]; +}; + +/* OSTA UDF 2.1.5.3 */ +#define ENTITYIDSUFFIX_FLAGS_HARDWRITEPROTECT 0 +#define ENTITYIDSUFFIX_FLAGS_SOFTWRITEPROTECT 1 + /* Volume Structure Descriptor (ECMA 167r3 2/9.1) */ #define VSD_STD_ID_LEN 5 struct volStructDesc { |