Restoring ACL only if -acl "on"

This commit is contained in:
2009-01-22 15:22:57 +00:00
parent 2cb7afe397
commit 7aff4003b0
3 changed files with 33 additions and 17 deletions

View File

@ -2897,25 +2897,27 @@ int Xorriso_restore_properties(struct XorrisO *xorriso, char *disk_path,
#ifdef Xorriso_with_aaiP
ret= iso_node_get_acl_text(node, &text, 16);
if(ret < 0) {
strcpy(xorriso->info_text, "Error with obtaining ACL for ");
Text_shellsafe(disk_path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
if(text != NULL) {
ret= iso_local_set_acl_text(disk_path, text, 0);
if(ret == -1) {
sprintf(xorriso->info_text,
"Cannot change ACL of disk file %s",
Text_shellsafe(disk_path, sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE", 0);
if(xorriso->do_aaip & 2) {
ret= iso_node_get_acl_text(node, &text, 16);
if(ret < 0) {
strcpy(xorriso->info_text, "Error with obtaining ACL for ");
Text_shellsafe(disk_path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
if(text != NULL) {
ret= iso_local_set_acl_text(disk_path, text, 0);
if(ret == -1) {
sprintf(xorriso->info_text,
"Cannot change ACL of disk file %s",
Text_shellsafe(disk_path, sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE",0);
{ret= 0; goto ex;}
}
}
}
#endif
#endif /* Xorriso_with_aaiP */
if(flag&1)
{ret= 1; goto ex;}