Correct group permission bits with -acl off and disk file that has ACL

This commit is contained in:
Thomas Schmitt 2009-02-07 14:26:12 +00:00
parent f5e6a8147b
commit 27c45c6df6
2 changed files with 15 additions and 2 deletions

View File

@ -1 +1 @@
#define Xorriso_timestamP "2009.02.07.090104"
#define Xorriso_timestamP "2009.02.07.142605"

View File

@ -1989,6 +1989,13 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf,
char **names= NULL, **values= NULL;
mode= stbuf->st_mode;
#ifdef Xorriso_with_aaiP
if((!(flag & 2)) && !(xorriso->do_aaip & 1))
/* Will drop ACL. Update mode S_IRWXG by eventual group:: ACL entry */
iso_local_get_perms_wo_acl(disk_path, &mode, flag & 32);
#endif
if((flag&1) && S_ISDIR(mode)) {
if(mode&S_IRUSR)
mode|= S_IXUSR;
@ -2007,6 +2014,8 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf,
if(flag & 2)
{ret= 1; goto ex;}
#ifdef Xorriso_with_aaiP
if(xorriso->do_aaip & 5) {
ret= iso_local_get_attrs(disk_path, &num_attrs, &names, &value_lengths,
&values, ((xorriso->do_aaip & 1) && !(flag & 2))
@ -2019,7 +2028,8 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf,
"FAILURE", 1 | 2);
ret= 0; goto ex;
}
ret= iso_node_set_attrs(node, num_attrs, names, value_lengths, values, 0);
ret= iso_node_set_attrs(node, num_attrs, names, value_lengths, values,
1 | 8);
if(ret < 0) {
Xorriso_process_msg_queues(xorriso,0);
Xorriso_report_iso_error(xorriso, "", ret,
@ -2029,6 +2039,9 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf,
}
ret= 1;
}
#endif /* Xorriso_with_aaiP */
ex:;
Xorriso_process_msg_queues(xorriso,0);
iso_local_get_attrs(disk_path, &num_attrs, &names, &value_lengths,