From f4910bc02e813aa773d6831b2dadacf60309ccd3 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 7 Feb 2009 14:26:12 +0000 Subject: [PATCH] Correct group permission bits with -acl off and disk file that has ACL --- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- libisoburn/trunk/xorriso/xorrisoburn.c | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 70c1e5ed..f55dc8bc 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2009.02.07.090104" +#define Xorriso_timestamP "2009.02.07.142605" diff --git a/libisoburn/trunk/xorriso/xorrisoburn.c b/libisoburn/trunk/xorriso/xorrisoburn.c index 3ae40110..702284ab 100644 --- a/libisoburn/trunk/xorriso/xorrisoburn.c +++ b/libisoburn/trunk/xorriso/xorrisoburn.c @@ -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,