const struct wim_security_data *sd = wim_const_security_data(w);
struct wim_dentry *first_dentry = inode_first_dentry(inode);
struct wim_dentry *dentry;
const struct wim_security_data *sd = wim_const_security_data(w);
struct wim_dentry *first_dentry = inode_first_dentry(inode);
struct wim_dentry *dentry;
/* Check the security ID. -1 is valid and means "no security
* descriptor". Anything else has to be a valid index into the WIM
/* Check the security ID. -1 is valid and means "no security
* descriptor". Anything else has to be a valid index into the WIM
if (inode->i_security_id < -1) {
ERROR("Dentry `%"TS"' has an invalid security ID (%d)",
dentry_full_path(first_dentry), inode->i_security_id);
if (inode->i_security_id < -1) {
ERROR("Dentry `%"TS"' has an invalid security ID (%d)",
dentry_full_path(first_dentry), inode->i_security_id);
ERROR("Dentry `%"TS"' has an invalid security ID (%d) "
"(there are only %u entries in the security table)",
dentry_full_path(first_dentry), inode->i_security_id,
sd->num_entries);
ERROR("Dentry `%"TS"' has an invalid security ID (%d) "
"(there are only %u entries in the security table)",
dentry_full_path(first_dentry), inode->i_security_id,
sd->num_entries);
lte = __lookup_resource(table, hash);
if (!lte && !is_zero_hash(hash)) {
ERROR("Could not find lookup table entry for stream "
"%u of dentry `%"TS"'",
i, dentry_full_path(first_dentry));
lte = __lookup_resource(table, hash);
if (!lte && !is_zero_hash(hash)) {
ERROR("Could not find lookup table entry for stream "
"%u of dentry `%"TS"'",
i, dentry_full_path(first_dentry));
if (inode_stream_name_nbytes(inode, i) == 0 && !is_zero_hash(hash))
num_unnamed_streams++;
}
if (num_unnamed_streams > 1) {
ERROR("Dentry `%"TS"' has multiple (%u) un-named streams",
dentry_full_path(first_dentry), num_unnamed_streams);
if (inode_stream_name_nbytes(inode, i) == 0 && !is_zero_hash(hash))
num_unnamed_streams++;
}
if (num_unnamed_streams > 1) {
ERROR("Dentry `%"TS"' has multiple (%u) un-named streams",
dentry_full_path(first_dentry), num_unnamed_streams);
inode_for_each_dentry(dentry, inode) {
if (dentry_has_short_name(dentry)) {
if (dentry_with_dos_name) {
inode_for_each_dentry(dentry, inode) {
if (dentry_has_short_name(dentry)) {
if (dentry_with_dos_name) {
+ /* This was previously an error, but if we
+ * capture a WIM from UDF on Windows, hard links
+ * are supported but DOS names are automatically
+ * generated for all names for an inode. */
+ #if 0
ERROR("Hard-linked file has a DOS name at "
"both `%"TS"' and `%"TS"'",
dentry_full_path(dentry_with_dos_name),
dentry_full_path(dentry));
ERROR("Hard-linked file has a DOS name at "
"both `%"TS"' and `%"TS"'",
dentry_full_path(dentry_with_dos_name),
dentry_full_path(dentry));
if (inode->i_nlink > 1 && inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY) {
ERROR("Hard-linked directory `%"TS"' is unsupported",
dentry_full_path(first_dentry));
if (inode->i_nlink > 1 && inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY) {
ERROR("Hard-linked directory `%"TS"' is unsupported",
dentry_full_path(first_dentry));
* in which case we need to force the inode to be verified again.) */
if (!dentry->d_inode->i_verified) {
ret = verify_inode(dentry->d_inode, w);
* in which case we need to force the inode to be verified again.) */
if (!dentry->d_inode->i_verified) {
ret = verify_inode(dentry->d_inode, w);