Bug fix: The function for restoring ACLs and xattr returned error on systems
other than Linux and FreeBSD, even if nothing was to be restored.
This commit is contained in:
parent
b90e613246
commit
6ae8386c23
@ -89,8 +89,12 @@ int aaip_set_attr_list(char *path, size_t num_attrs, char **names,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Extended Attribute */
|
/* Extended Attribute */
|
||||||
if(!(flag & 4))
|
if(flag & 4)
|
||||||
return(-6);
|
continue;
|
||||||
|
if(!(flag & 8))
|
||||||
|
if(strncmp(names[i], "user.", 5))
|
||||||
|
continue;
|
||||||
|
return(-6);
|
||||||
}
|
}
|
||||||
if(flag & 2)
|
if(flag & 2)
|
||||||
return(-6);
|
return(-6);
|
||||||
|
@ -447,10 +447,26 @@ int aaip_set_attr_list(char *path, size_t num_attrs, char **names,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Extended Attribute */
|
/* Extended Attribute */
|
||||||
|
|
||||||
|
#ifdef Libisofs_aaip_linux_set_attr_list_neW
|
||||||
|
/* >>> Enable this after release 1.1.4. */
|
||||||
|
|
||||||
|
if(flag & 4)
|
||||||
|
continue;
|
||||||
|
if(!(flag & 8))
|
||||||
|
if(strncmp(names[i], "user.", 5))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
#else /* Libisofs_aaip_linux_set_attr_list_neW */
|
||||||
|
/* <<< This worked well, but obviously only because bit0 is always set */
|
||||||
|
|
||||||
if((flag & 1) && !(flag & 8))
|
if((flag & 1) && !(flag & 8))
|
||||||
if(strncmp(names[i], "user.", 5))
|
if(strncmp(names[i], "user.", 5))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
#endif /* ! Libisofs_aaip_linux_set_attr_list_neW */
|
||||||
|
|
||||||
|
|
||||||
#ifdef Libisofs_with_aaip_xattR
|
#ifdef Libisofs_with_aaip_xattR
|
||||||
|
|
||||||
if(flag & 32)
|
if(flag & 32)
|
||||||
|
@ -862,6 +862,8 @@ int iso_local_set_attrs(char *disk_path, size_t num_attrs, char **names,
|
|||||||
return ISO_OUT_OF_MEM;
|
return ISO_OUT_OF_MEM;
|
||||||
if (ret == -2)
|
if (ret == -2)
|
||||||
return ISO_AAIP_BAD_AASTRING;
|
return ISO_AAIP_BAD_AASTRING;
|
||||||
|
if (ret == -6 || ret == -7)
|
||||||
|
return ISO_AAIP_NOT_ENABLED;
|
||||||
return ISO_AAIP_NO_SET_LOCAL;
|
return ISO_AAIP_NO_SET_LOCAL;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user