New commands -projid, -get_projid, -get_projid_r, -set_projid, -set_projid_r, -find test -has_projid, -find actions get_projid, set_projid, get_projid_minmax
This commit is contained in:
parent
923bfa0be9
commit
32bfa95973
@ -380,6 +380,9 @@ isoburn_toc_track_get_emul_v2;
|
|||||||
Xorriso_option_chattri;
|
Xorriso_option_chattri;
|
||||||
Xorriso_option_for_backup;
|
Xorriso_option_for_backup;
|
||||||
Xorriso_option_genisoimage_completion;
|
Xorriso_option_genisoimage_completion;
|
||||||
|
Xorriso_option_get_projid;
|
||||||
Xorriso_option_lfa_flags;
|
Xorriso_option_lfa_flags;
|
||||||
|
Xorriso_option_projid;
|
||||||
|
Xorriso_option_set_projid;
|
||||||
} LIBISOBURN1;
|
} LIBISOBURN1;
|
||||||
|
|
||||||
|
@ -159,6 +159,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
|
|||||||
m->do_aaip= 0;
|
m->do_aaip= 0;
|
||||||
if(m->lfa_flags_setting & 1)
|
if(m->lfa_flags_setting & 1)
|
||||||
m->do_aaip|= m->lfa_flags_setting & (15 << 11);
|
m->do_aaip|= m->lfa_flags_setting & (15 << 11);
|
||||||
|
m->projid_mapper= NULL;
|
||||||
m->do_md5= 64;
|
m->do_md5= 64;
|
||||||
m->no_emul_toc= 0;
|
m->no_emul_toc= 0;
|
||||||
m->do_old_empty= 0;
|
m->do_old_empty= 0;
|
||||||
|
@ -295,6 +295,7 @@ ex:;
|
|||||||
bit24= hardlink split
|
bit24= hardlink split
|
||||||
bit25= hardlink fusion
|
bit25= hardlink fusion
|
||||||
bit26= Linux file attribute mismatch
|
bit26= Linux file attribute mismatch
|
||||||
|
bit27= XFS-style project id mismatch
|
||||||
@param flag bit0= compare atime
|
@param flag bit0= compare atime
|
||||||
bit1= compare ctime
|
bit1= compare ctime
|
||||||
bit2= check only existence of both file objects
|
bit2= check only existence of both file objects
|
||||||
@ -323,6 +324,7 @@ int Xorriso_compare_2_files(struct XorrisO *xorriso, char *disk_adr,
|
|||||||
int split_count= 0;
|
int split_count= 0;
|
||||||
time_t stamp;
|
time_t stamp;
|
||||||
uint64_t lfa_flags1, lfa_flags2;
|
uint64_t lfa_flags1, lfa_flags2;
|
||||||
|
uint32_t projid1= 0, projid2= 0;
|
||||||
|
|
||||||
char *part_path= NULL, *part_name;
|
char *part_path= NULL, *part_name;
|
||||||
int partno, total_parts= 0;
|
int partno, total_parts= 0;
|
||||||
@ -520,6 +522,25 @@ int Xorriso_compare_2_files(struct XorrisO *xorriso, char *disk_adr,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* XFS-style project id */
|
||||||
|
if(xorriso->do_aaip & (1 << 17)) {
|
||||||
|
ret= Xorriso_get_projid(xorriso, NULL, disk_adr, &projid1,
|
||||||
|
2 | ((flag & (1 << 28)) >> 23));
|
||||||
|
if(ret < 0)
|
||||||
|
goto ex;
|
||||||
|
ret= Xorriso_get_projid(xorriso, NULL, iso_adr, &projid2, 0);
|
||||||
|
if(ret < 0)
|
||||||
|
goto ex;
|
||||||
|
if(projid1 != projid2) {
|
||||||
|
(*result)|= (1 << 27);
|
||||||
|
sprintf(respt, "%s projid : %lu <> %lu",
|
||||||
|
a, (unsigned long int) projid1, (unsigned long int) projid2);
|
||||||
|
strcat(respt, "\n");
|
||||||
|
if(!(flag & (1u << 31)))
|
||||||
|
Xorriso_result(xorriso, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(s1.st_uid != s2.st_uid) {
|
if(s1.st_uid != s2.st_uid) {
|
||||||
sprintf(respt, "%s st_uid : %lu <> %lu\n", a,
|
sprintf(respt, "%s st_uid : %lu <> %lu\n", a,
|
||||||
(unsigned long) s1.st_uid, (unsigned long) s2.st_uid);
|
(unsigned long) s1.st_uid, (unsigned long) s2.st_uid);
|
||||||
|
@ -372,6 +372,24 @@ else
|
|||||||
echo "disabled Linux chattr(1) flags"
|
echo "disabled Linux chattr(1) flags"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl ts C41009
|
||||||
|
AH_TEMPLATE([Libisofs_with_aaip_projiD],
|
||||||
|
[Define to use XFS-style project id capabilities])
|
||||||
|
PROJID_DEF=
|
||||||
|
AC_ARG_ENABLE(projid,
|
||||||
|
[ --enable-projid Enable processing of XFS-style project id, default=yes],
|
||||||
|
, enable_projid=yes)
|
||||||
|
if test x"$enable_projid" = xyes; then
|
||||||
|
AC_CHECK_HEADER(linux/fs.h, PROJID_DEF="-DLibisofs_with_aaip_projiD",
|
||||||
|
PROJID_DEF=)
|
||||||
|
fi
|
||||||
|
if test x"$PROJID_DEF" = x; then
|
||||||
|
echo "disabled XFS-style project id"
|
||||||
|
else
|
||||||
|
AC_DEFINE([Libisofs_with_aaip_projiD], [])
|
||||||
|
echo "enabled XFS-style project id"
|
||||||
|
fi
|
||||||
|
|
||||||
AH_TEMPLATE([Libisofs_with_zliB], [Define to use compression via zlib])
|
AH_TEMPLATE([Libisofs_with_zliB], [Define to use compression via zlib])
|
||||||
AH_TEMPLATE([LIBJTE_WITH_ZLIB], [Allow libjte to use zlib])
|
AH_TEMPLATE([LIBJTE_WITH_ZLIB], [Allow libjte to use zlib])
|
||||||
AC_ARG_ENABLE(zlib,
|
AC_ARG_ENABLE(zlib,
|
||||||
|
@ -1162,6 +1162,7 @@ int Xorriso_findx_action(struct XorrisO *xorriso, struct FindjoB *job,
|
|||||||
time_t date= 0;
|
time_t date= 0;
|
||||||
mode_t mode_or= 0, mode_and= ~1;
|
mode_t mode_or= 0, mode_and= ~1;
|
||||||
uint64_t chattr_flags, lfa_flags;
|
uint64_t chattr_flags, lfa_flags;
|
||||||
|
uint32_t projid;
|
||||||
char *target, *text_2, *wdi_mem= NULL, *disk_prefix, *iso_path= NULL;
|
char *target, *text_2, *wdi_mem= NULL, *disk_prefix, *iso_path= NULL;
|
||||||
char *basename, *lfa_text= NULL, *acl_text= NULL, *attrlist= NULL;
|
char *basename, *lfa_text= NULL, *acl_text= NULL, *attrlist= NULL;
|
||||||
char *leafname= NULL;
|
char *leafname= NULL;
|
||||||
@ -1323,7 +1324,21 @@ int Xorriso_findx_action(struct XorrisO *xorriso, struct FindjoB *job,
|
|||||||
ret= 1;
|
ret= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else if(action == 63) { /* get_projid */
|
||||||
|
ret= Xorriso_get_projid(xorriso, NULL, show_path, &projid, 2);
|
||||||
|
if(ret > 0)
|
||||||
|
Xorriso_show_projid(xorriso, show_path, projid, 0);
|
||||||
|
|
||||||
|
} else if(action == 65) { /* get_projid_minmax */
|
||||||
|
ret= Xorriso_get_projid(xorriso, NULL, show_path, &projid, 2);
|
||||||
|
if(ret > 0) {
|
||||||
|
if((off_t) projid < job->projid_low || job->projid_low == -1)
|
||||||
|
job->projid_low= projid;
|
||||||
|
if((off_t) projid > job->projid_high || job->projid_high == -1)
|
||||||
|
job->projid_high= projid;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else { /* all other actions default to echo */
|
||||||
Xorriso_esc_filepath(xorriso,show_path, xorriso->result_line, 0);
|
Xorriso_esc_filepath(xorriso,show_path, xorriso->result_line, 0);
|
||||||
strcat(xorriso->result_line, "\n");
|
strcat(xorriso->result_line, "\n");
|
||||||
Xorriso_result(xorriso, 0);
|
Xorriso_result(xorriso, 0);
|
||||||
|
@ -182,7 +182,14 @@ static int Xorriso_grasp_loaded_aaip(struct XorrisO *xorriso, IsoImage *volset,
|
|||||||
|
|
||||||
if(!(xorriso->do_aaip & (1 << 11))) {
|
if(!(xorriso->do_aaip & (1 << 11))) {
|
||||||
/* lfa_flags not enabled for "read" */
|
/* lfa_flags not enabled for "read" */
|
||||||
ret= Xorriso_remove_all_lfa_flags(xorriso, 0);
|
ret= Xorriso_tree_remove_isofs_var(xorriso, "isofs.fa", 0);
|
||||||
|
if(ret <= 0)
|
||||||
|
goto ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(xorriso->do_aaip & (1 << 17))) {
|
||||||
|
/* projid not enabled */
|
||||||
|
ret= Xorriso_tree_remove_isofs_var(xorriso, "isofs.pi", 0);
|
||||||
if(ret <= 0)
|
if(ret <= 0)
|
||||||
goto ex;
|
goto ex;
|
||||||
}
|
}
|
||||||
@ -276,7 +283,7 @@ int Xorriso_make_read_options(struct XorrisO *xorriso,
|
|||||||
if(xorriso->read_fs & 2)
|
if(xorriso->read_fs & 2)
|
||||||
ext|= isoburn_ropt_nojoliet;
|
ext|= isoburn_ropt_nojoliet;
|
||||||
if((xorriso->ino_behavior & (1 | 2)) &&
|
if((xorriso->ino_behavior & (1 | 2)) &&
|
||||||
!(xorriso->do_aaip & (1 | 4 | 32 | (1 << 11)))
|
!(xorriso->do_aaip & (1 | 4 | 32 | (1 << 11) | (1 << 17)))
|
||||||
&& !(xorriso->do_md5 & 1) && !(xorriso->do_hfsplus))
|
&& !(xorriso->do_md5 & 1) && !(xorriso->do_hfsplus))
|
||||||
ext|= isoburn_ropt_noaaip;
|
ext|= isoburn_ropt_noaaip;
|
||||||
if(!(xorriso->do_aaip & 1))
|
if(!(xorriso->do_aaip & 1))
|
||||||
@ -285,6 +292,8 @@ int Xorriso_make_read_options(struct XorrisO *xorriso,
|
|||||||
ext|= isoburn_ropt_noea;
|
ext|= isoburn_ropt_noea;
|
||||||
if(xorriso->do_aaip & (1 << 11))
|
if(xorriso->do_aaip & (1 << 11))
|
||||||
ext|= isoburn_ropt_lfa_flags;
|
ext|= isoburn_ropt_lfa_flags;
|
||||||
|
if(xorriso->do_aaip & (1 << 17))
|
||||||
|
ext|= isoburn_ropt_projid;
|
||||||
if(xorriso->do_aaip & (1 << 15))
|
if(xorriso->do_aaip & (1 << 15))
|
||||||
ext|= isoburn_ropt_lfa_only_settable;
|
ext|= isoburn_ropt_lfa_only_settable;
|
||||||
if(xorriso->ino_behavior & 1)
|
if(xorriso->ino_behavior & 1)
|
||||||
@ -479,6 +488,8 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
|
|||||||
}
|
}
|
||||||
if(xorriso->do_aaip & (1 << 11))
|
if(xorriso->do_aaip & (1 << 11))
|
||||||
aquire_flag|= 1 << 11;
|
aquire_flag|= 1 << 11;
|
||||||
|
if(xorriso->do_aaip & (1 << 17))
|
||||||
|
aquire_flag|= 1 << 12;
|
||||||
if(xorriso->do_aaip & (1 << 15))
|
if(xorriso->do_aaip & (1 << 15))
|
||||||
aquire_flag|= 1 << 15;
|
aquire_flag|= 1 << 15;
|
||||||
if(flag & 128)
|
if(flag & 128)
|
||||||
|
@ -372,20 +372,26 @@ int Findjob_new(struct FindjoB **o, char *start_path, int flag)
|
|||||||
m->text_2= NULL; /* a mere pointer, not managed memory */
|
m->text_2= NULL; /* a mere pointer, not managed memory */
|
||||||
m->user= 0;
|
m->user= 0;
|
||||||
m->group= 0;
|
m->group= 0;
|
||||||
|
m->mode_and= ~0;
|
||||||
|
m->mode_or= 0;
|
||||||
m->type= 0;
|
m->type= 0;
|
||||||
m->date= 0;
|
m->date= 0;
|
||||||
m->start_path= strdup(start_path);
|
|
||||||
if(m->start_path==NULL)
|
|
||||||
goto failed;
|
|
||||||
m->found_path= NULL;
|
m->found_path= NULL;
|
||||||
m->estim_upper_size= 0;
|
m->estim_upper_size= 0;
|
||||||
m->estim_lower_size= 0;
|
m->estim_lower_size= 0;
|
||||||
m->subjob= NULL;
|
m->subjob= NULL;
|
||||||
|
m->last_data_file_block= 0;
|
||||||
|
m->lfa_flags= 0;
|
||||||
|
m->projid_low= -1;
|
||||||
|
m->projid_high= -1;
|
||||||
m->errmsg[0]= 0;
|
m->errmsg[0]= 0;
|
||||||
m->errn= 0;
|
m->errn= 0;
|
||||||
m->match_count= 0;
|
m->match_count= 0;
|
||||||
m->depth= 0;
|
m->depth= 0;
|
||||||
|
|
||||||
|
m->start_path= strdup(start_path);
|
||||||
|
if(m->start_path==NULL)
|
||||||
|
goto failed;
|
||||||
ret= Exprnode_new(&(m->test_tree), m, NULL, "-find", (m->use_shortcuts)<<1);
|
ret= Exprnode_new(&(m->test_tree), m, NULL, "-find", (m->use_shortcuts)<<1);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
goto failed;
|
goto failed;
|
||||||
|
@ -59,6 +59,7 @@ struct ExprtesT {
|
|||||||
-2=smaller_or_equal , 2=larger_or_equal)
|
-2=smaller_or_equal , 2=larger_or_equal)
|
||||||
28= -has_lfa_flags uint64_t *arg1 (Linux file attribute flag bits)
|
28= -has_lfa_flags uint64_t *arg1 (Linux file attribute flag bits)
|
||||||
29= -has_some_lfa_flags_of uint64_t *arg1
|
29= -has_some_lfa_flags_of uint64_t *arg1
|
||||||
|
30= -has_projid uint64_t *arg1
|
||||||
*/
|
*/
|
||||||
int test_type;
|
int test_type;
|
||||||
|
|
||||||
@ -193,6 +194,9 @@ struct FindjoB {
|
|||||||
61= chattr mode
|
61= chattr mode
|
||||||
62= internal: like 27 "setfattr name value" but with permission for all
|
62= internal: like 27 "setfattr name value" but with permission for all
|
||||||
name spaces including "isofs."
|
name spaces including "isofs."
|
||||||
|
63= get_projid
|
||||||
|
64= set_projid projid
|
||||||
|
65= get_projid_minmax
|
||||||
*/
|
*/
|
||||||
int action;
|
int action;
|
||||||
int prune;
|
int prune;
|
||||||
@ -213,6 +217,8 @@ struct FindjoB {
|
|||||||
struct FindjoB *subjob;
|
struct FindjoB *subjob;
|
||||||
uint32_t last_data_file_block;
|
uint32_t last_data_file_block;
|
||||||
uint64_t lfa_flags;
|
uint64_t lfa_flags;
|
||||||
|
off_t projid_low;
|
||||||
|
off_t projid_high;
|
||||||
|
|
||||||
/* Errors */
|
/* Errors */
|
||||||
char errmsg[4096];
|
char errmsg[4096];
|
||||||
|
@ -51,6 +51,8 @@ int Xorriso_set_ignore_aclea(struct XorrisO *xorriso, int flag)
|
|||||||
hflag|= 8;
|
hflag|= 8;
|
||||||
if(xorriso->do_aaip & 2048)
|
if(xorriso->do_aaip & 2048)
|
||||||
hflag|= 4;
|
hflag|= 4;
|
||||||
|
if(xorriso->do_aaip & (1 << 17))
|
||||||
|
hflag|= 64;
|
||||||
if(xorriso->do_aaip & (1 << 15))
|
if(xorriso->do_aaip & (1 << 15))
|
||||||
hflag|= 32;
|
hflag|= 32;
|
||||||
iso_image_set_ignore_aclea(volume, hflag);
|
iso_image_set_ignore_aclea(volume, hflag);
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* @param flag bit0= give directory x-permission where is r-permission
|
/* @param flag bit0= give directory x-permission where is r-permission
|
||||||
bit1= do not transfer ACL, xattr, file attribute flags
|
bit1= do not transfer ACL, xattr, lfa_flags, projid
|
||||||
bit2= record dev,inode (only if enabled by xorriso)
|
bit2= record dev,inode (only if enabled by xorriso)
|
||||||
bit3= with bit0: pretend to have indeed a directory
|
bit3= with bit0: pretend to have indeed a directory
|
||||||
bit5= transfer ACL or xattr from eventual link target
|
bit5= transfer ACL or xattr from eventual link target
|
||||||
@ -50,7 +50,8 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf,
|
|||||||
{
|
{
|
||||||
mode_t mode;
|
mode_t mode;
|
||||||
int ret= 1, max_bit, os_errno;
|
int ret= 1, max_bit, os_errno;
|
||||||
uint64_t lfa_flags;
|
uint64_t lfa_flags= 0;
|
||||||
|
uint32_t projid= 0;
|
||||||
size_t num_attrs= 0, *value_lengths= NULL;
|
size_t num_attrs= 0, *value_lengths= NULL;
|
||||||
char **names= NULL, **values= NULL;
|
char **names= NULL, **values= NULL;
|
||||||
|
|
||||||
@ -75,7 +76,7 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf,
|
|||||||
iso_node_set_mtime(node, stbuf->st_mtime);
|
iso_node_set_mtime(node, stbuf->st_mtime);
|
||||||
iso_node_set_ctime(node, stbuf->st_ctime);
|
iso_node_set_ctime(node, stbuf->st_ctime);
|
||||||
|
|
||||||
if((xorriso->do_aaip & (1 | 4 | 2048)) && !(flag & 2)) {
|
if((xorriso->do_aaip & (1 | 4 | 2048 | (1 << 17))) && !(flag & 2)) {
|
||||||
ret= iso_local_get_attrs(disk_path, &num_attrs, &names, &value_lengths,
|
ret= iso_local_get_attrs(disk_path, &num_attrs, &names, &value_lengths,
|
||||||
&values, ((xorriso->do_aaip & 1) && !(flag & 2))
|
&values, ((xorriso->do_aaip & 1) && !(flag & 2))
|
||||||
| ((!(xorriso->do_aaip & 4)) << 2)
|
| ((!(xorriso->do_aaip & 4)) << 2)
|
||||||
@ -104,11 +105,13 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf,
|
|||||||
if((xorriso->do_aaip & (1 << 15)) && ret >= 0 && lfa_flags == 0)
|
if((xorriso->do_aaip & (1 << 15)) && ret >= 0 && lfa_flags == 0)
|
||||||
ret= 4;
|
ret= 4;
|
||||||
if(ret < 0) {
|
if(ret < 0) {
|
||||||
|
if(ret != (int) ISO_LFA_NOT_ENABLED) {
|
||||||
Xorriso_process_msg_queues(xorriso, 0);
|
Xorriso_process_msg_queues(xorriso, 0);
|
||||||
Xorriso_report_iso_error(xorriso, disk_path, ret,
|
Xorriso_report_iso_error(xorriso, disk_path, ret,
|
||||||
"Error when obtaining file attribute flags",
|
"Error when obtaining file attribute flags",
|
||||||
os_errno, "FAILURE", 1 | 2);
|
os_errno, "FAILURE", 1 | 2);
|
||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
|
}
|
||||||
} else if(ret == 1 || ret == 2) {
|
} else if(ret == 1 || ret == 2) {
|
||||||
ret= iso_node_set_lfa_flags(node, lfa_flags, 0);
|
ret= iso_node_set_lfa_flags(node, lfa_flags, 0);
|
||||||
if(ret < 0) {
|
if(ret < 0) {
|
||||||
@ -120,6 +123,15 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(xorriso->do_aaip & (1 << 17)) {
|
||||||
|
ret= Xorriso_get_projid(xorriso, NULL, disk_path, &projid,
|
||||||
|
(flag & 32) | 2);
|
||||||
|
if(ret <= 0)
|
||||||
|
goto ex;
|
||||||
|
ret= Xorriso_set_projid(xorriso, node, NULL, projid, 0);
|
||||||
|
if(ret <= 0)
|
||||||
|
goto ex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if((flag & 4) && ((xorriso->do_aaip & 16) || !(xorriso->ino_behavior & 2))) {
|
if((flag & 4) && ((xorriso->do_aaip & 16) || !(xorriso->ino_behavior & 2))) {
|
||||||
@ -2712,6 +2724,7 @@ int Xorriso_findi_action(struct XorrisO *xorriso, struct FindjoB *job,
|
|||||||
uint64_t lfa_flags, chattr_flags;
|
uint64_t lfa_flags, chattr_flags;
|
||||||
int max_bit;
|
int max_bit;
|
||||||
char *lfa_text= NULL;
|
char *lfa_text= NULL;
|
||||||
|
uint32_t projid;
|
||||||
|
|
||||||
action= Findjob_get_action_parms(job, &target, &text_2, &user, &group,
|
action= Findjob_get_action_parms(job, &target, &text_2, &user, &group,
|
||||||
&mode_and, &mode_or, &type, &date, &subjob,
|
&mode_and, &mode_or, &type, &date, &subjob,
|
||||||
@ -3044,6 +3057,23 @@ int Xorriso_findi_action(struct XorrisO *xorriso, struct FindjoB *job,
|
|||||||
ret= Xorriso_set_lfa_flags(xorriso, node, show_path, "",
|
ret= Xorriso_set_lfa_flags(xorriso, node, show_path, "",
|
||||||
chattr_flags, type, 1 | 4);
|
chattr_flags, type, 1 | 4);
|
||||||
|
|
||||||
|
} else if(action == 63) { /* get_projid */
|
||||||
|
ret= Xorriso_get_projid(xorriso, node, NULL, &projid, 0);
|
||||||
|
if(ret > 0)
|
||||||
|
Xorriso_show_projid(xorriso, show_path, projid, 0);
|
||||||
|
|
||||||
|
} else if(action == 64) { /* set_projid */
|
||||||
|
ret= Xorriso_set_projid(xorriso, node, NULL, (uint32_t) chattr_flags, 0);
|
||||||
|
|
||||||
|
} else if(action == 65) { /* get_projid_minmax */
|
||||||
|
ret= Xorriso_get_projid(xorriso, node, NULL, &projid, 0);
|
||||||
|
if(ret > 0) {
|
||||||
|
if((off_t) projid < job->projid_low || job->projid_low == -1)
|
||||||
|
job->projid_low= projid;
|
||||||
|
if((off_t) projid > job->projid_high || job->projid_high == -1)
|
||||||
|
job->projid_high= projid;
|
||||||
|
}
|
||||||
|
|
||||||
} else { /* includes : 15 in_iso */
|
} else { /* includes : 15 in_iso */
|
||||||
Xorriso_esc_filepath(xorriso, show_path, xorriso->result_line, 0);
|
Xorriso_esc_filepath(xorriso, show_path, xorriso->result_line, 0);
|
||||||
strcat(xorriso->result_line, "\n");
|
strcat(xorriso->result_line, "\n");
|
||||||
@ -3117,6 +3147,7 @@ return:
|
|||||||
off_t range_lba, end_lba, *file_end_lbas= NULL, *file_start_lbas= NULL;
|
off_t range_lba, end_lba, *file_end_lbas= NULL, *file_start_lbas= NULL;
|
||||||
off_t start_lba;
|
off_t start_lba;
|
||||||
uint64_t lfa_flags, node_flags;
|
uint64_t lfa_flags, node_flags;
|
||||||
|
uint32_t projid;
|
||||||
void *arg1, *arg2;
|
void *arg1, *arg2;
|
||||||
char ft, *decision, md5[16], bless_code[17], *acl_text= NULL;
|
char ft, *decision, md5[16], bless_code[17], *acl_text= NULL;
|
||||||
regmatch_t name_match;
|
regmatch_t name_match;
|
||||||
@ -3456,6 +3487,21 @@ test_name:;
|
|||||||
value= !!(node_flags & lfa_flags);
|
value= !!(node_flags & lfa_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break; case 30: /* -has_projid uint64_t projid (in ->lfa_flags) */
|
||||||
|
lfa_flags= *((uint64_t *) ftest->arg1);
|
||||||
|
if(node == NULL) {
|
||||||
|
hflag= 2;
|
||||||
|
ret= Xorriso_get_projid(xorriso, NULL, path, &projid, hflag);
|
||||||
|
} else {
|
||||||
|
ret= Xorriso_get_projid(xorriso, node, path, &projid, 0);
|
||||||
|
}
|
||||||
|
if(ret <= 0) {
|
||||||
|
Xorriso_process_msg_queues(xorriso, 0);
|
||||||
|
value= 0;
|
||||||
|
goto ex;
|
||||||
|
}
|
||||||
|
value= (lfa_flags == (uint64_t) projid);
|
||||||
|
|
||||||
break; default:
|
break; default:
|
||||||
|
|
||||||
/* >>> complain about unknown test type */;
|
/* >>> complain about unknown test type */;
|
||||||
@ -4846,18 +4892,29 @@ int Xorriso_set_lfa_flags(struct XorrisO *xorriso, void *in_node, char *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Xorriso_remove_all_lfa_flags(struct XorrisO *xorriso, int flag)
|
int Xorriso_tree_remove_isofs_var(struct XorrisO *xorriso, char *isofs_name,
|
||||||
|
int flag)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct FindjoB *job= NULL;
|
struct FindjoB *job= NULL;
|
||||||
struct stat dir_stbuf;
|
struct stat dir_stbuf;
|
||||||
|
char name[40];
|
||||||
|
|
||||||
|
if(strlen(isofs_name) > 38 || strncmp(isofs_name, "isofs.", 6) != 0) {
|
||||||
|
Xorriso_msgs_submit(xorriso, 0,
|
||||||
|
"Program error: Bad name for Xorriso_tree_remove_isofs_var",
|
||||||
|
0, "FATAL", 0);
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, isofs_name, 0, "FATAL", 0);
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
sprintf(name, "-%s", isofs_name);
|
||||||
|
|
||||||
ret= Findjob_new(&job, "/", 0);
|
ret= Findjob_new(&job, "/", 0);
|
||||||
if(ret<=0) {
|
if(ret<=0) {
|
||||||
Xorriso_no_findjob(xorriso, "xorriso", 0);
|
Xorriso_no_findjob(xorriso, "xorriso", 0);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
Findjob_set_action_text_2(job, 62, "-isofs.fa", "", 0);
|
Findjob_set_action_text_2(job, 62, name, "", 0);
|
||||||
|
|
||||||
ret= Xorriso_findi(xorriso, job, NULL, (off_t) 0, NULL, "/",
|
ret= Xorriso_findi(xorriso, job, NULL, (off_t) 0, NULL, "/",
|
||||||
&dir_stbuf, 0, 0);
|
&dir_stbuf, 0, 0);
|
||||||
@ -4867,3 +4924,34 @@ int Xorriso_remove_all_lfa_flags(struct XorrisO *xorriso, int flag)
|
|||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* @param in_node if not NULL: the node to manipulate
|
||||||
|
@path if in_node is NULL: path to node
|
||||||
|
in any case: path to report with errors
|
||||||
|
*/
|
||||||
|
int Xorriso_set_projid(struct XorrisO *xorriso, void *in_node, char *path,
|
||||||
|
uint32_t projid, int flag)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
IsoNode *node;
|
||||||
|
|
||||||
|
if(in_node != NULL) {
|
||||||
|
node= (IsoNode *) in_node;
|
||||||
|
} else {
|
||||||
|
ret= Xorriso_get_node_by_path(xorriso, path, NULL, &node, 0);
|
||||||
|
if(ret <= 0)
|
||||||
|
return(ret);
|
||||||
|
}
|
||||||
|
ret= iso_node_set_projid(node, projid, 0);
|
||||||
|
if(ret < 0) {
|
||||||
|
Xorriso_process_msg_queues(xorriso, 0);
|
||||||
|
Xorriso_report_iso_error(xorriso, path, ret,
|
||||||
|
"Error when setting XFS-style project id of ISO node",
|
||||||
|
0, "SORRY", 1);
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
Xorriso_set_change_pending(xorriso, 0);
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2973,14 +2973,66 @@ from_disk:;
|
|||||||
ret= iso_local_get_lfa_flags(path, lfa_flags, max_bit, &os_errno,
|
ret= iso_local_get_lfa_flags(path, lfa_flags, max_bit, &os_errno,
|
||||||
flag & ((1 << 5) | (1 << 7)));
|
flag & ((1 << 5) | (1 << 7)));
|
||||||
if(ret < 0) {
|
if(ret < 0) {
|
||||||
|
if(ret != (int) ISO_LFA_NOT_ENABLED) {
|
||||||
Xorriso_process_msg_queues(xorriso, 0);
|
Xorriso_process_msg_queues(xorriso, 0);
|
||||||
Xorriso_report_iso_error(xorriso, path, ret,
|
Xorriso_report_iso_error(xorriso, path, ret,
|
||||||
"Error when obtaining lsattr flags of disk file",
|
"Error when obtaining lsattr flags of disk file",
|
||||||
os_errno, "WARNING", 1);
|
os_errno, "WARNING", 1);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(ret == 1 || ret == 2)
|
if(ret == 1 || ret == 2)
|
||||||
return(1);
|
return(1);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
@param in_node if not NULL and not flag bit1: omit path resolution
|
||||||
|
@param flag bit1= path is disk_path
|
||||||
|
bit5= in case of symbolic link on disk: inquire link target
|
||||||
|
@return >0 = ok , *projid is valid
|
||||||
|
<0 = libisofs error
|
||||||
|
*/
|
||||||
|
int Xorriso_get_projid(struct XorrisO *xorriso, void *in_node, char *path,
|
||||||
|
uint32_t *projid, int flag)
|
||||||
|
{
|
||||||
|
int ret, os_errno;
|
||||||
|
IsoNode *node;
|
||||||
|
|
||||||
|
*projid= 0;
|
||||||
|
|
||||||
|
if(flag & 2)
|
||||||
|
goto from_disk;
|
||||||
|
|
||||||
|
node= (IsoNode *) in_node;
|
||||||
|
if(node == NULL) {
|
||||||
|
ret= Xorriso_get_node_by_path(xorriso, path, NULL, &node, 0);
|
||||||
|
if(ret <= 0)
|
||||||
|
return(ret);
|
||||||
|
}
|
||||||
|
ret= iso_node_get_projid(node, projid, 0);
|
||||||
|
if(ret < 0) {
|
||||||
|
Xorriso_process_msg_queues(xorriso, 0);
|
||||||
|
Xorriso_report_iso_error(xorriso, path, ret,
|
||||||
|
"Error when obtaining XFS-style project id of ISO node",
|
||||||
|
0, "WARNING", 1);
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
return(1);
|
||||||
|
|
||||||
|
from_disk:;
|
||||||
|
ret= iso_local_get_projid(path, projid, &os_errno, flag & (1 << 5));
|
||||||
|
if(ret < 0) {
|
||||||
|
if(ret != (int) ISO_PROJID_NOT_ENABLED) {
|
||||||
|
Xorriso_process_msg_queues(xorriso, 0);
|
||||||
|
Xorriso_report_iso_error(xorriso, path, ret,
|
||||||
|
"Error when obtaining XFS-style project id of disk file",
|
||||||
|
os_errno, "WARNING", 1);
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -930,6 +930,8 @@ int Xorriso_list_extras(struct XorrisO *xorriso, char *mode, int flag)
|
|||||||
Xorriso_result(xorriso, 0);
|
Xorriso_result(xorriso, 0);
|
||||||
sprintf(xorriso->result_line, "Local chattr : -lfa_flags\n");
|
sprintf(xorriso->result_line, "Local chattr : -lfa_flags\n");
|
||||||
Xorriso_result(xorriso, 0);
|
Xorriso_result(xorriso, 0);
|
||||||
|
sprintf(xorriso->result_line, "Local projid : -projid\n");
|
||||||
|
Xorriso_result(xorriso, 0);
|
||||||
sprintf(xorriso->result_line, "Jigdo files : -jigdo\n");
|
sprintf(xorriso->result_line, "Jigdo files : -jigdo\n");
|
||||||
Xorriso_result(xorriso, 0);
|
Xorriso_result(xorriso, 0);
|
||||||
sprintf(xorriso->result_line, "zisofs : -zisofs\n");
|
sprintf(xorriso->result_line, "zisofs : -zisofs\n");
|
||||||
@ -946,13 +948,15 @@ int Xorriso_list_extras(struct XorrisO *xorriso, char *mode, int flag)
|
|||||||
"List of xorriso extra features. yes = enabled , no = disabled\n");
|
"List of xorriso extra features. yes = enabled , no = disabled\n");
|
||||||
Xorriso_list_extras_result(xorriso, mode, "list_extras", 0);
|
Xorriso_list_extras_result(xorriso, mode, "list_extras", 0);
|
||||||
|
|
||||||
ret= iso_local_attr_support(7);
|
ret= iso_local_attr_support(15);
|
||||||
sprintf(xorriso->result_line, "Local ACL : %s\n", ret & 1 ? "yes" : "no");
|
sprintf(xorriso->result_line, "Local ACL : %s\n", ret & 1 ? "yes" : "no");
|
||||||
Xorriso_list_extras_result(xorriso, mode, "acl", 0);
|
Xorriso_list_extras_result(xorriso, mode, "acl", 0);
|
||||||
sprintf(xorriso->result_line, "Local xattr : %s\n", ret & 2 ? "yes" : "no");
|
sprintf(xorriso->result_line, "Local xattr : %s\n", ret & 2 ? "yes" : "no");
|
||||||
Xorriso_list_extras_result(xorriso, mode, "xattr", 0);
|
Xorriso_list_extras_result(xorriso, mode, "xattr", 0);
|
||||||
sprintf(xorriso->result_line, "Local chattr : %s\n", ret & 4 ? "yes" : "no");
|
sprintf(xorriso->result_line, "Local chattr : %s\n", ret & 4 ? "yes" : "no");
|
||||||
Xorriso_list_extras_result(xorriso, mode, "lfa_flags", 0);
|
Xorriso_list_extras_result(xorriso, mode, "lfa_flags", 0);
|
||||||
|
sprintf(xorriso->result_line, "Local projid : %s\n", ret & 8 ? "yes" : "no");
|
||||||
|
Xorriso_list_extras_result(xorriso, mode, "lfa_flags", 0);
|
||||||
|
|
||||||
sprintf(xorriso->result_line, "Jigdo files : %s\n",
|
sprintf(xorriso->result_line, "Jigdo files : %s\n",
|
||||||
#ifdef Xorriso_with_libjtE
|
#ifdef Xorriso_with_libjtE
|
||||||
|
@ -958,6 +958,22 @@ off_t_overflow:;
|
|||||||
Findjob_set_uint64_filter(job,
|
Findjob_set_uint64_filter(job,
|
||||||
28 + (strcmp(argv[i - 1], "-has_some_lfa_flags_of") == 0),
|
28 + (strcmp(argv[i - 1], "-has_some_lfa_flags_of") == 0),
|
||||||
lfa_flags, 0);
|
lfa_flags, 0);
|
||||||
|
|
||||||
|
} else if(strcmp(argv[i], "-has_projid") == 0) {
|
||||||
|
if(i + 1 >= end_idx)
|
||||||
|
goto not_enough_arguments;
|
||||||
|
i++;
|
||||||
|
ret= Sfile_text_to_off_t(argv[i - 1], &start_lba, 0);
|
||||||
|
if(ret <= 0) {
|
||||||
|
bad_projid:;
|
||||||
|
sprintf(xorriso->info_text,
|
||||||
|
"-has_projid: project id number too large or too small");
|
||||||
|
goto sorry_ex;
|
||||||
|
}
|
||||||
|
if(start_lba < 0 || start_lba > (off_t) 0xffffffff)
|
||||||
|
goto bad_projid;
|
||||||
|
Findjob_set_uint64_filter(job, 30, (uint64_t) start_lba, 0);
|
||||||
|
|
||||||
} else if(strcmp(argv[i], "-has_filter")==0) {
|
} else if(strcmp(argv[i], "-has_filter")==0) {
|
||||||
Findjob_set_filter_filter(job, 1, 0);
|
Findjob_set_filter_filter(job, 1, 0);
|
||||||
} else if(strcmp(argv[i], "-has_no_filter")==0) {
|
} else if(strcmp(argv[i], "-has_no_filter")==0) {
|
||||||
@ -1494,6 +1510,25 @@ not_enough_exec_arguments:;
|
|||||||
if(ret <= 0)
|
if(ret <= 0)
|
||||||
goto sorry_ex;
|
goto sorry_ex;
|
||||||
Findjob_set_action_chattr(job, 61, lfa_flags, operator, 0);
|
Findjob_set_action_chattr(job, 61, lfa_flags, operator, 0);
|
||||||
|
} else if(strcmp(cpt, "get_projid") == 0) {
|
||||||
|
Findjob_set_action_target(job, 63, NULL, 0);
|
||||||
|
} else if(strcmp(cpt, "set_projid") == 0) {
|
||||||
|
if(i + 1 >= end_idx)
|
||||||
|
goto not_enough_exec_arguments;
|
||||||
|
i++;
|
||||||
|
ret= Sfile_text_to_off_t(argv[i], &start_lba, 0);
|
||||||
|
if(ret <= 0) {
|
||||||
|
bad_set_projid:;
|
||||||
|
sprintf(xorriso->info_text,
|
||||||
|
"set_projid: project id number too large or too small");
|
||||||
|
goto sorry_ex;
|
||||||
|
}
|
||||||
|
if(start_lba < 0 || start_lba > (off_t) 0xffffffff)
|
||||||
|
goto bad_set_projid;
|
||||||
|
operator= 0;
|
||||||
|
Findjob_set_action_chattr(job, 64, start_lba, operator, 0);
|
||||||
|
} else if(strcmp(cpt, "get_projid_minmax") == 0) {
|
||||||
|
Findjob_set_action_target(job, 65, NULL, 0);
|
||||||
} else {
|
} else {
|
||||||
sprintf(xorriso->info_text, "-find -exec: unknown action ");
|
sprintf(xorriso->info_text, "-find -exec: unknown action ");
|
||||||
Text_shellsafe(argv[i], xorriso->info_text, 1);
|
Text_shellsafe(argv[i], xorriso->info_text, 1);
|
||||||
@ -1564,6 +1599,17 @@ ex:;
|
|||||||
!!(first_job->estim_upper_size % 2048)));
|
!!(first_job->estim_upper_size % 2048)));
|
||||||
Xorriso_result(xorriso,0);
|
Xorriso_result(xorriso,0);
|
||||||
}
|
}
|
||||||
|
if(first_job != NULL && first_job->action == 65) {
|
||||||
|
if(first_job->projid_low >= 0 && first_job->projid_high >= 0) {
|
||||||
|
sprintf(xorriso->result_line, "projid minmax: %lu %lu\n",
|
||||||
|
(unsigned long) first_job->projid_low,
|
||||||
|
(unsigned long) first_job->projid_high);
|
||||||
|
} else {
|
||||||
|
sprintf(xorriso->result_line, "projid minmax: -1 -1\n");
|
||||||
|
}
|
||||||
|
Xorriso_result(xorriso,0);
|
||||||
|
}
|
||||||
|
|
||||||
if(access_acl_text != NULL)
|
if(access_acl_text != NULL)
|
||||||
free(access_acl_text);
|
free(access_acl_text);
|
||||||
if(default_acl_text != NULL)
|
if(default_acl_text != NULL)
|
||||||
@ -1671,6 +1717,7 @@ int Xorriso_option_for_backup(struct XorrisO *xorriso, int flag)
|
|||||||
if(xorriso->lfa_flags_default & 8)
|
if(xorriso->lfa_flags_default & 8)
|
||||||
Xorriso_option_lfa_flags(xorriso,
|
Xorriso_option_lfa_flags(xorriso,
|
||||||
"default:on:import_only_settable:restore_mask=aAcdDijmPsStTux", 0);
|
"default:on:import_only_settable:restore_mask=aAcdDijmPsStTux", 0);
|
||||||
|
Xorriso_option_projid(xorriso, "on", 0);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1713,6 +1760,61 @@ int Xorriso_option_genisoimage_completion(struct XorrisO *xorriso,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Commands -get_projid alias get_projidi
|
||||||
|
-get_projid_r alias -get_projid_ri */
|
||||||
|
/* @param flag bit0=recursive -get_projid_r
|
||||||
|
*/
|
||||||
|
int Xorriso_option_get_projid(struct XorrisO *xorriso,
|
||||||
|
int argc, char **argv, int *idx, int flag)
|
||||||
|
{
|
||||||
|
int i, ret, was_failure= 0, end_idx, fret;
|
||||||
|
int optc= 0;
|
||||||
|
uint32_t projid= 0;
|
||||||
|
char **optv= NULL;
|
||||||
|
struct FindjoB *job= NULL;
|
||||||
|
struct stat dir_stbuf;
|
||||||
|
|
||||||
|
ret= Xorriso_opt_args(xorriso, "-get_projid", argc, argv, *idx,
|
||||||
|
&end_idx, &optc, &optv, 0);
|
||||||
|
if(ret <= 0)
|
||||||
|
goto ex;
|
||||||
|
|
||||||
|
for(i= 0; i < optc; i++) {
|
||||||
|
if(flag & 1) {
|
||||||
|
ret= Findjob_new(&job, optv[i], 0);
|
||||||
|
if(ret <= 0) {
|
||||||
|
Xorriso_no_findjob(xorriso, "-get_projid_r", 0);
|
||||||
|
{ret= -1; goto ex;}
|
||||||
|
}
|
||||||
|
Findjob_set_action_target(job, 63, NULL, 0);
|
||||||
|
ret= Xorriso_findi(xorriso, job, NULL, (off_t) 0,
|
||||||
|
NULL, optv[i], &dir_stbuf, 0, 0);
|
||||||
|
Findjob_destroy(&job, 0);
|
||||||
|
} else {
|
||||||
|
ret= Xorriso_get_projid(xorriso, NULL, optv[i], &projid, 0);
|
||||||
|
if(ret > 0)
|
||||||
|
Xorriso_show_projid(xorriso, optv[i], projid, 0);
|
||||||
|
}
|
||||||
|
if(ret > 0 && !xorriso->request_to_abort)
|
||||||
|
continue; /* regular bottom of loop */
|
||||||
|
was_failure= 1;
|
||||||
|
fret= Xorriso_eval_problem_status(xorriso, ret, 1 | 2);
|
||||||
|
if(fret>=0)
|
||||||
|
continue;
|
||||||
|
ret= 0; goto ex;
|
||||||
|
}
|
||||||
|
ret= 1;
|
||||||
|
ex:;
|
||||||
|
(*idx)= end_idx;
|
||||||
|
Xorriso_opt_args(xorriso, "-get_projid", argc, argv, *idx, &end_idx,
|
||||||
|
&optc, &optv, 256);
|
||||||
|
Findjob_destroy(&job, 0);
|
||||||
|
if(ret<=0)
|
||||||
|
return(ret);
|
||||||
|
return(!was_failure);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Commands -getfacl alias -getfacli, -getfacl_r alias -getfacl_ri
|
/* Commands -getfacl alias -getfacli, -getfacl_r alias -getfacl_ri
|
||||||
-getfattr alias getfattri
|
-getfattr alias getfattri
|
||||||
*/
|
*/
|
||||||
@ -1978,10 +2080,14 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
|||||||
" -lfa_flags mode[:mode ...]",
|
" -lfa_flags mode[:mode ...]",
|
||||||
" Enable or disable reading and restoring of Linux chattr",
|
" Enable or disable reading and restoring of Linux chattr",
|
||||||
" flags.",
|
" flags.",
|
||||||
|
" -projid \"on\"|\"off\"|\"restore_0\"|\"map+\"low,high=low,high",
|
||||||
|
" Enable or disable reading and restoring of XFS-style",
|
||||||
|
" project ids. Define mapping of ids at restore time.",
|
||||||
" -md5 \"on\"|\"all\"|\"off\"",
|
" -md5 \"on\"|\"all\"|\"off\"",
|
||||||
" Enable or disable processing of MD5 checksums.",
|
" Enable or disable processing of MD5 checksums.",
|
||||||
" -for_backup",
|
" -for_backup",
|
||||||
" Shortcut for: -hardlinks on -acl on -xattr any -md5 on",
|
" Shortcut for: -hardlinks on -acl on -xattr any -md5 on",
|
||||||
|
" -projid on",
|
||||||
" possibly: -lfa_flags default:on:restore_mask=aAcCdDijmPsStTux",
|
" possibly: -lfa_flags default:on:restore_mask=aAcCdDijmPsStTux",
|
||||||
" -ecma119_map \"unmapped\"|\"stripped\"|\"uppercase\"|\"lowercase\"",
|
" -ecma119_map \"unmapped\"|\"stripped\"|\"uppercase\"|\"lowercase\"",
|
||||||
" Choose conversion of file names if neither Rock Ridge",
|
" Choose conversion of file names if neither Rock Ridge",
|
||||||
@ -2254,6 +2360,12 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
|||||||
" xattr of the iso_rr_path given by line \"# file:\".",
|
" xattr of the iso_rr_path given by line \"# file:\".",
|
||||||
" -chattr \"+\"|\"-\"|\"=\"|\".\"mode iso_rr_path [***]",
|
" -chattr \"+\"|\"-\"|\"=\"|\".\"mode iso_rr_path [***]",
|
||||||
" Set or unset Linux chattr flags of the given files.",
|
" Set or unset Linux chattr flags of the given files.",
|
||||||
|
" -chattr_r \"+\"|\"-\"|\"=\"|\".\"mode iso_rr_path [***]",
|
||||||
|
" Like -chattr but affecting all files below directories.",
|
||||||
|
" -set_projid number iso_rr_path [***]",
|
||||||
|
" Set XFS-style project id number of the given files.",
|
||||||
|
" -set_projid_r number iso_rr_path [***]",
|
||||||
|
" Like -set_projid but affecting all files below directories.",
|
||||||
" -alter_date type timestring iso_rr_path [***]",
|
" -alter_date type timestring iso_rr_path [***]",
|
||||||
" Alter the date entries of a file in the ISO image. type is",
|
" Alter the date entries of a file in the ISO image. type is",
|
||||||
" one of \"a\", \"m\", \"b\" for:",
|
" one of \"a\", \"m\", \"b\" for:",
|
||||||
@ -2273,6 +2385,7 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
|||||||
" -lba_range start count, -damaged, -has_acl, -has_xattr,",
|
" -lba_range start count, -damaged, -has_acl, -has_xattr,",
|
||||||
" -has_aaip, -has_filter, -has_md5, -has_any_xattr,",
|
" -has_aaip, -has_filter, -has_md5, -has_any_xattr,",
|
||||||
" -has_lfa_flags letters, -has_some_lfa_flags_of letters,",
|
" -has_lfa_flags letters, -has_some_lfa_flags_of letters,",
|
||||||
|
" -has_projid number,",
|
||||||
" -has_hfs_crtp, -has_hfs_bless, -bad_outname,",
|
" -has_hfs_crtp, -has_hfs_bless, -bad_outname,",
|
||||||
" -name_limit_blocker, -maxdepth, -mindepth, -size,",
|
" -name_limit_blocker, -maxdepth, -mindepth, -size,",
|
||||||
" -prune, -decision yes|no, -true, -false",
|
" -prune, -decision yes|no, -true, -false",
|
||||||
@ -2286,9 +2399,10 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
|||||||
" list_extattr, get_md5, check_md5, make_md5,",
|
" list_extattr, get_md5, check_md5, make_md5,",
|
||||||
" set_hfs_crtp, get_hfs_crtp, set_hfs_bless, get_hfs_bless,",
|
" set_hfs_crtp, get_hfs_crtp, set_hfs_bless, get_hfs_bless,",
|
||||||
" set_filter, show_stream, show_stream_id, mkisofs_r,",
|
" set_filter, show_stream, show_stream_id, mkisofs_r,",
|
||||||
" hide, print_outname, estimate_size, in_iso, not_in_iso",
|
" hide, print_outname, estimate_size, in_iso, not_in_iso,",
|
||||||
" add_missing, empty_iso_dir, is_full_in_iso, sort_weight",
|
" add_missing, empty_iso_dir, is_full_in_iso, sort_weight,",
|
||||||
" update_merge, rm_merge, clear_merge, lsattrd, chattr, find",
|
" update_merge, rm_merge, clear_merge, lsattrd, chattr,",
|
||||||
|
" get_projid, set_projid, get_projid_minmax, find",
|
||||||
" params are their parameters except iso_rr_path.",
|
" params are their parameters except iso_rr_path.",
|
||||||
" -mkdir iso_rr_path [...]",
|
" -mkdir iso_rr_path [...]",
|
||||||
" Create empty directories if they do not exist yet.",
|
" Create empty directories if they do not exist yet.",
|
||||||
@ -2442,12 +2556,14 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
|||||||
" -lsdx pattern [***] like -lsx but listing directories as single items.",
|
" -lsdx pattern [***] like -lsx but listing directories as single items.",
|
||||||
" -lslx pattern [***] like -lsx but also telling some file attributes.",
|
" -lslx pattern [***] like -lsx but also telling some file attributes.",
|
||||||
" -lsdlx pattern [***] like -lsdx but also telling some file attributes.",
|
" -lsdlx pattern [***] like -lsdx but also telling some file attributes.",
|
||||||
" -lsattr pattern [***] lists Linux chattr flags of the given files.",
|
|
||||||
" -lsattrd pattern [***] like -lsattr but listing directories as single items.",
|
|
||||||
" -getfacl pattern [***] list eventual ACLs of the given files.",
|
" -getfacl pattern [***] list eventual ACLs of the given files.",
|
||||||
" -getfacl_r pattern [***] like -getfacl but listing whole file trees.",
|
" -getfacl_r pattern [***] like -getfacl but listing whole file trees.",
|
||||||
" -getfattr pattern [***] list eventual xattr of the given files.",
|
" -getfattr pattern [***] list eventual xattr of the given files.",
|
||||||
" -getfxattr_r pattern [***] like -getfxattr but listing whole file trees.",
|
" -getfattr_r pattern [***] like -getfattr but listing whole file trees.",
|
||||||
|
" -lsattr pattern [***] lists Linux chattr flags of the given files.",
|
||||||
|
" -lsattrd pattern [***] like -lsattr but listing directories as single items.",
|
||||||
|
" -get_projid pattern [***] lists XFS-style project ids of the given files.",
|
||||||
|
" -get_projid_r pattern [***] like -get_projid but listing whole file trees.",
|
||||||
"",
|
"",
|
||||||
" -du pattern [***] recursively lists sizes of files or directories in the",
|
" -du pattern [***] recursively lists sizes of files or directories in the",
|
||||||
" ISO image which match one of the shell parser patterns.",
|
" ISO image which match one of the shell parser patterns.",
|
||||||
|
@ -401,6 +401,95 @@ int Xorriso_option_prog_help(struct XorrisO *xorriso, char *name, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Command -projid */
|
||||||
|
int Xorriso_option_projid(struct XorrisO *xorriso, char *mode, int flag)
|
||||||
|
{
|
||||||
|
int ret, l;
|
||||||
|
off_t from_low= 0, from_high= 0, to_low= 0, to_high= 0;
|
||||||
|
char *npt, *cpt, errmsg[80];
|
||||||
|
|
||||||
|
npt= cpt= mode;
|
||||||
|
for(; npt != NULL; cpt= npt + 1) {
|
||||||
|
npt= strchr(cpt, ':');
|
||||||
|
if(npt==NULL)
|
||||||
|
l= strlen(cpt);
|
||||||
|
else
|
||||||
|
l= npt-cpt;
|
||||||
|
if(l == 0)
|
||||||
|
continue;
|
||||||
|
if(l == 2 && strncmp(cpt, "on", l) == 0) {
|
||||||
|
xorriso->do_aaip|= (1 << 17);
|
||||||
|
} else if(l == 3 && strncmp(cpt, "off", l) == 0) {
|
||||||
|
xorriso->do_aaip&= ~(1 << 17);
|
||||||
|
} else if(l == 9 && strncmp(cpt, "restore_0", l) == 0) {
|
||||||
|
xorriso->do_aaip|= (1 << 18);
|
||||||
|
} else if(l == 9 && strncmp(cpt, "no_restore_0", l) == 0) {
|
||||||
|
xorriso->do_aaip&= ~(1 << 18);
|
||||||
|
} else if(l >= 4 && strncmp(cpt, "map+", 4) == 0) {
|
||||||
|
if(xorriso->projid_mapper == NULL) {
|
||||||
|
ret= Numbermapper_new(&(xorriso->projid_mapper),
|
||||||
|
(off_t) 0, (off_t) 0xffffffff, 0);
|
||||||
|
if(ret <= 0) {
|
||||||
|
sprintf(xorriso->info_text, "-projid: Cannot create mapper object");
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
|
{ret= 0; goto ex;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ret= Numbermapper_decode(xorriso->projid_mapper, cpt + 4,
|
||||||
|
&from_low, &from_high, &to_low, &to_high,
|
||||||
|
errmsg, 0);
|
||||||
|
if(ret <= 0) {
|
||||||
|
sprintf(xorriso->info_text, "-projid: map+ text unusable: %s", errmsg);
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
||||||
|
{ret= 0; goto ex;}
|
||||||
|
}
|
||||||
|
ret= Numbermapper_add(xorriso->projid_mapper, from_low, from_high,
|
||||||
|
to_low, to_high, 0);
|
||||||
|
if(ret <= 0) {
|
||||||
|
sprintf(xorriso->info_text, "-projid: Cannot create mapper entry");
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
|
{ret= 0; goto ex;}
|
||||||
|
}
|
||||||
|
} else if(l > 9 && strncmp(cpt, "map_test=", 9) == 0) {
|
||||||
|
strncpy(errmsg, cpt + 9, l - 9);
|
||||||
|
errmsg[l - 9]= 0;
|
||||||
|
ret= Sfile_text_to_off_t(errmsg, &from_low, 0);
|
||||||
|
if(ret <= 0) {
|
||||||
|
sprintf(xorriso->info_text,
|
||||||
|
"-projid: map= text cannot be converted to a number: %s",
|
||||||
|
errmsg);
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
||||||
|
{ret= 0; goto ex;}
|
||||||
|
}
|
||||||
|
ret= Numbermapper_map(xorriso->projid_mapper, from_low, &to_low, 0);
|
||||||
|
if(ret < 0) {
|
||||||
|
sprintf(xorriso->info_text,
|
||||||
|
"-projid: map=%s yields unexpected error", errmsg);
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
||||||
|
{ret= 0; goto ex;}
|
||||||
|
}
|
||||||
|
sprintf(xorriso->result_line, "projid mapped: %lu -> %lu\n",
|
||||||
|
from_low, to_low);
|
||||||
|
Xorriso_result(xorriso, 0);
|
||||||
|
} else if(l == 7 && strncmp(cpt, "default", l) == 0) {
|
||||||
|
xorriso->do_aaip&= ~(3 << 17);
|
||||||
|
Numbermapper_destroy(&(xorriso->projid_mapper), 0);
|
||||||
|
} else {
|
||||||
|
sprintf(xorriso->info_text,
|
||||||
|
"-projid: unknown or mistyped mode in '%s'", mode);
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
|
{ret= 0; goto ex;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ret= Xorriso_set_ignore_aclea(xorriso, 0);
|
||||||
|
if(ret <= 0)
|
||||||
|
goto ex;
|
||||||
|
ret= 1;
|
||||||
|
ex:
|
||||||
|
return(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Option -prompt */
|
/* Option -prompt */
|
||||||
int Xorriso_option_prompt(struct XorrisO *xorriso, char *text, int flag)
|
int Xorriso_option_prompt(struct XorrisO *xorriso, char *text, int flag)
|
||||||
{
|
{
|
||||||
@ -831,6 +920,71 @@ int Xorriso_option_session_log(struct XorrisO *xorriso, char *path, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Commands -set_projid alias -set_projidi
|
||||||
|
-set_projid_r alias -set_projid_ri */
|
||||||
|
/* @param flag bit0=recursive -set_projid_r
|
||||||
|
*/
|
||||||
|
int Xorriso_option_set_projid(struct XorrisO *xorriso, char *projid_text,
|
||||||
|
int argc, char **argv, int *idx, int flag)
|
||||||
|
{
|
||||||
|
int i, ret, was_failure= 0, end_idx, fret;
|
||||||
|
int optc= 0;
|
||||||
|
uint32_t projid= 0;
|
||||||
|
off_t num;
|
||||||
|
char **optv= NULL;
|
||||||
|
struct FindjoB *job= NULL;
|
||||||
|
struct stat dir_stbuf;
|
||||||
|
|
||||||
|
ret= Xorriso_opt_args(xorriso, "-set_projid", argc, argv, *idx,
|
||||||
|
&end_idx, &optc, &optv, 0);
|
||||||
|
if(ret <= 0)
|
||||||
|
goto ex;
|
||||||
|
ret= Sfile_text_to_off_t(projid_text, &num, 0);
|
||||||
|
if(ret <= 0) {
|
||||||
|
bad_set_projid:;
|
||||||
|
sprintf(xorriso->info_text,
|
||||||
|
"-set_projid: project id number too large or too small");
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
|
ret= 0; goto ex;
|
||||||
|
}
|
||||||
|
if(num < 0 || num > (off_t) 0xffffffff)
|
||||||
|
goto bad_set_projid;
|
||||||
|
projid= num;
|
||||||
|
|
||||||
|
for(i= 0; i < optc; i++) {
|
||||||
|
if(flag & 1) {
|
||||||
|
ret= Findjob_new(&job, optv[i], 0);
|
||||||
|
if(ret <= 0) {
|
||||||
|
Xorriso_no_findjob(xorriso, "-set_projid_r", 0);
|
||||||
|
{ret= -1; goto ex;}
|
||||||
|
}
|
||||||
|
Findjob_set_action_chattr(job, 64, (uint64_t) projid, 0, 0);
|
||||||
|
ret= Xorriso_findi(xorriso, job, NULL, (off_t) 0,
|
||||||
|
NULL, optv[i], &dir_stbuf, 0, 0);
|
||||||
|
Findjob_destroy(&job, 0);
|
||||||
|
} else {
|
||||||
|
ret= Xorriso_set_projid(xorriso, NULL, optv[i], projid, 0);
|
||||||
|
}
|
||||||
|
if(ret>0 && !xorriso->request_to_abort)
|
||||||
|
continue; /* regular bottom of loop */
|
||||||
|
was_failure= 1;
|
||||||
|
fret= Xorriso_eval_problem_status(xorriso, ret, 1|2);
|
||||||
|
if(fret>=0)
|
||||||
|
continue;
|
||||||
|
ret= 0; goto ex;
|
||||||
|
}
|
||||||
|
ret= 1;
|
||||||
|
ex:;
|
||||||
|
(*idx)= end_idx;
|
||||||
|
Xorriso_opt_args(xorriso, "-set_projid", argc, argv, *idx, &end_idx,
|
||||||
|
&optc, &optv, 256);
|
||||||
|
Findjob_destroy(&job, 0);
|
||||||
|
if(ret<=0)
|
||||||
|
return(ret);
|
||||||
|
return(!was_failure);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Option -setfacl_list alias -setfacl_listi */
|
/* Option -setfacl_list alias -setfacl_listi */
|
||||||
int Xorriso_option_setfacl_listi(struct XorrisO *xorriso, char *path, int flag)
|
int Xorriso_option_setfacl_listi(struct XorrisO *xorriso, char *path, int flag)
|
||||||
{
|
{
|
||||||
|
@ -599,7 +599,8 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
|
|||||||
"options_from_file","osirrox","outdev","out_charset","overwrite",
|
"options_from_file","osirrox","outdev","out_charset","overwrite",
|
||||||
"pacifier","padding","path_list","pathspecs","pkt_output",
|
"pacifier","padding","path_list","pathspecs","pkt_output",
|
||||||
"preparer_id","print","print_info","print_mark","prompt",
|
"preparer_id","print","print_info","print_mark","prompt",
|
||||||
"prog","prog_help","publisher","quoted_not_list","quoted_path_list",
|
"prog","prog_help","projid","publisher",
|
||||||
|
"quoted_not_list","quoted_path_list",
|
||||||
"read_fs","read_speed","reassure","report_about",
|
"read_fs","read_speed","reassure","report_about",
|
||||||
"report_el_torito","report_system_area","rockridge",
|
"report_el_torito","report_system_area","rockridge",
|
||||||
"rom_toc_scan","rr_reloc_dir","scsi_dev_family","scsi_log",
|
"rom_toc_scan","rr_reloc_dir","scsi_dev_family","scsi_log",
|
||||||
@ -640,6 +641,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
|
|||||||
"compare_l","concat","cp_clone","cp_rax","cp_rx","cpr","cpri","cpax","cpx",
|
"compare_l","concat","cp_clone","cp_rax","cp_rx","cpr","cpri","cpax","cpx",
|
||||||
"du","dui","dus","dusi","dux","dusx","external_filter","extract_l",
|
"du","dui","dus","dusi","dux","dusx","external_filter","extract_l",
|
||||||
"file_size_limit","find","findi","finds","findx",
|
"file_size_limit","find","findi","finds","findx",
|
||||||
|
"get_projid","get_projidi","get_projid_r","get_projid_ri",
|
||||||
"getfacl","getfacli","getfacl_r","getfacl_ri",
|
"getfacl","getfacli","getfacl_r","getfacl_ri",
|
||||||
"getfattr","getfattri","getfattr_r","getfattr_ri","hide",
|
"getfattr","getfattri","getfattr_r","getfattr_ri","hide",
|
||||||
"launch_frontend","lsattr","lsattri","lsattrd","lsaddrdi",
|
"launch_frontend","lsattr","lsattri","lsattrd","lsaddrdi",
|
||||||
@ -647,6 +649,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
|
|||||||
"lsx","lslx","lsdx","lsdlx","map_l","mv","mvi","mkdir","mkdiri",
|
"lsx","lslx","lsdx","lsdlx","map_l","mv","mvi","mkdir","mkdiri",
|
||||||
"not_paths","rm","rmi","rm_r","rm_ri","rmdir","rmdiri",
|
"not_paths","rm","rmi","rm_r","rm_ri","rmdir","rmdiri",
|
||||||
"update_l","update_li","update_lx","update_lxi",
|
"update_l","update_li","update_lx","update_lxi",
|
||||||
|
"set_projid","set_projidi","set_projid_r","set_projid_ri",
|
||||||
"setfacl","setfacli","setfacl_list","setfacl_listi",
|
"setfacl","setfacli","setfacl_list","setfacl_listi",
|
||||||
"setfacl_r","setfacl_ri","setfattr","setfattri",
|
"setfacl_r","setfacl_ri","setfattr","setfattri",
|
||||||
"setfattr_r","setfattr_ri",
|
"setfattr_r","setfattr_ri",
|
||||||
@ -746,7 +749,7 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso,
|
|||||||
"* Influencing the behavior of image loading:",
|
"* Influencing the behavior of image loading:",
|
||||||
"read_speed", "load", "displacement", "read_fs",
|
"read_speed", "load", "displacement", "read_fs",
|
||||||
"assert_volid", "in_charset", "auto_charset",
|
"assert_volid", "in_charset", "auto_charset",
|
||||||
"for_backup", "hardlinks", "acl", "xattr", "md5", "lfa_flags",
|
"for_backup", "hardlinks", "acl", "xattr", "md5", "lfa_flags", "projid",
|
||||||
"ecma119_map", "joliet_map",
|
"ecma119_map", "joliet_map",
|
||||||
"disk_dev_ino", "rom_toc_scan", "calm_drive", "ban_stdio_write",
|
"disk_dev_ino", "rom_toc_scan", "calm_drive", "ban_stdio_write",
|
||||||
"data_cache_size",
|
"data_cache_size",
|
||||||
@ -781,8 +784,8 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso,
|
|||||||
|
|
||||||
"* Navigation in ISO image and disk filesystem (2):",
|
"* Navigation in ISO image and disk filesystem (2):",
|
||||||
"ls", "lsd", "lsl", "lsdl", "lsx", "lsdx", "lslx", "lsdlx",
|
"ls", "lsd", "lsl", "lsdl", "lsx", "lsdx", "lslx", "lsdlx",
|
||||||
"lsattr", "lsattri", "lsattrd", "lsaddrdi",
|
|
||||||
"getfacl", "getfacl_r", "getfattr", "getfattr_r", "du", "dus",
|
"getfacl", "getfacl_r", "getfattr", "getfattr_r", "du", "dus",
|
||||||
|
"lsattr", "lsattrd", "get_projid", "get_projid_r",
|
||||||
"dux", "dusx", "findx",
|
"dux", "dusx", "findx",
|
||||||
"compare", "compare_r", "compare_l", "show_stream", "show_stream_r",
|
"compare", "compare_r", "compare_l", "show_stream", "show_stream_r",
|
||||||
|
|
||||||
@ -791,7 +794,8 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso,
|
|||||||
"rm", "rm_r", "rmdir", "move", "mv",
|
"rm", "rm_r", "rmdir", "move", "mv",
|
||||||
"chown", "chown_r", "chgrp", "chgrp_r", "chmod", "chmod_r", "setfacl",
|
"chown", "chown_r", "chgrp", "chgrp_r", "chmod", "chmod_r", "setfacl",
|
||||||
"setfacl_r", "setfacl_list", "setfattr", "setfattr_r", "setfattr_list",
|
"setfacl_r", "setfacl_list", "setfattr", "setfattr_r", "setfattr_list",
|
||||||
"chattr", "chattr_r", "alter_date", "alter_date_r", "hide",
|
"chattr", "chattr_r", "set_projid", "set_projid_r",
|
||||||
|
"alter_date", "alter_date_r", "hide",
|
||||||
|
|
||||||
"* Filters for data file content:",
|
"* Filters for data file content:",
|
||||||
"external_filter", "unregister_filter", "close_filter_list",
|
"external_filter", "unregister_filter", "close_filter_list",
|
||||||
@ -1446,6 +1450,13 @@ next_command:;
|
|||||||
(*idx)++;
|
(*idx)++;
|
||||||
ret= Xorriso_option_genisoimage_completion(xorriso, arg1, 0);
|
ret= Xorriso_option_genisoimage_completion(xorriso, arg1, 0);
|
||||||
|
|
||||||
|
} else if(strcmp(cmd, "get_projid") == 0 || strcmp(cmd, "get_projidi") == 0) {
|
||||||
|
ret= Xorriso_option_get_projid(xorriso, argc, argv, idx, 0);
|
||||||
|
|
||||||
|
} else if(strcmp(cmd, "get_projid_r") == 0 ||
|
||||||
|
strcmp(cmd, "get_projid_ri") == 0) {
|
||||||
|
ret= Xorriso_option_get_projid(xorriso, argc, argv, idx, 1);
|
||||||
|
|
||||||
} else if(strcmp(cmd,"getfacl")==0 || strcmp(cmd,"getfacli")==0) {
|
} else if(strcmp(cmd,"getfacl")==0 || strcmp(cmd,"getfacli")==0) {
|
||||||
ret= Xorriso_option_getfacli(xorriso, argc, argv, idx, 0);
|
ret= Xorriso_option_getfacli(xorriso, argc, argv, idx, 0);
|
||||||
|
|
||||||
@ -1752,6 +1763,10 @@ next_command:;
|
|||||||
(*idx)++;
|
(*idx)++;
|
||||||
ret= Xorriso_option_prog(xorriso, arg1, 0);
|
ret= Xorriso_option_prog(xorriso, arg1, 0);
|
||||||
|
|
||||||
|
} else if(strcmp(cmd,"projid") == 0) {
|
||||||
|
(*idx)++;
|
||||||
|
ret= Xorriso_option_projid(xorriso, arg1, 0);
|
||||||
|
|
||||||
} else if(strcmp(cmd,"publisher")==0) {
|
} else if(strcmp(cmd,"publisher")==0) {
|
||||||
(*idx)++;
|
(*idx)++;
|
||||||
Xorriso_option_publisher(xorriso, arg1, 0);
|
Xorriso_option_publisher(xorriso, arg1, 0);
|
||||||
@ -1866,6 +1881,15 @@ next_command:;
|
|||||||
ret= Xorriso_option_mount(xorriso, arg1, arg2,
|
ret= Xorriso_option_mount(xorriso, arg1, arg2,
|
||||||
argv[(*idx)-2], argv[(*idx)-1], 2);
|
argv[(*idx)-2], argv[(*idx)-1], 2);
|
||||||
|
|
||||||
|
} else if(strcmp(cmd, "set_projid") == 0 || strcmp(cmd, "set_projidi") == 0) {
|
||||||
|
(*idx)++;
|
||||||
|
ret= Xorriso_option_set_projid(xorriso, arg1, argc, argv, idx, 0);
|
||||||
|
|
||||||
|
} else if(strcmp(cmd, "set_projid_r") == 0 ||
|
||||||
|
strcmp(cmd, "set_projid_ri") == 0) {
|
||||||
|
(*idx)++;
|
||||||
|
ret= Xorriso_option_set_projid(xorriso, arg1, argc, argv, idx, 1);
|
||||||
|
|
||||||
} else if(strcmp(cmd,"setfacl")==0 || strcmp(cmd,"setfacli")==0) {
|
} else if(strcmp(cmd,"setfacl")==0 || strcmp(cmd,"setfacli")==0) {
|
||||||
(*idx)+= 1;
|
(*idx)+= 1;
|
||||||
ret= Xorriso_option_setfacli(xorriso, arg1, argc, argv, idx, 0);
|
ret= Xorriso_option_setfacli(xorriso, arg1, argc, argv, idx, 0);
|
||||||
|
@ -584,6 +584,8 @@ int Xorriso_restore_properties(struct XorrisO *xorriso, char *disk_path,
|
|||||||
int *errnos= NULL;
|
int *errnos= NULL;
|
||||||
uint64_t lfa_flags= 0, mask= 0, push_mask= 0;
|
uint64_t lfa_flags= 0, mask= 0, push_mask= 0;
|
||||||
int max_bit, os_errno;
|
int max_bit, os_errno;
|
||||||
|
uint32_t projid;
|
||||||
|
off_t off_t_projid;
|
||||||
static uint64_t lfa_C= 0xffffffff, lfa_i= 0, lfa_a= 0, lfa_F= 0;
|
static uint64_t lfa_C= 0xffffffff, lfa_i= 0, lfa_a= 0, lfa_F= 0;
|
||||||
|
|
||||||
if(lfa_C == 0xffffffff) {
|
if(lfa_C == 0xffffffff) {
|
||||||
@ -770,6 +772,28 @@ cannot_set_perm:;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(xorriso->do_aaip & (1 << 17)) {
|
||||||
|
ret= Xorriso_get_projid(xorriso, node, NULL, &projid, 0);
|
||||||
|
if(ret < 0)
|
||||||
|
goto ex;
|
||||||
|
ret= Numbermapper_map(xorriso->projid_mapper, (off_t) projid, &off_t_projid,
|
||||||
|
0);
|
||||||
|
if(ret < 0)
|
||||||
|
goto ex;
|
||||||
|
projid= off_t_projid;
|
||||||
|
if(projid != 0 || (xorriso->do_aaip & (1 << 18))) {
|
||||||
|
ret= iso_local_set_projid(disk_path, projid, &os_errno, 0);
|
||||||
|
if(ret < 0) {
|
||||||
|
Xorriso_process_msg_queues(xorriso, 0);
|
||||||
|
strcpy(xorriso->info_text,
|
||||||
|
"Error with setting XFS-style project id for ");
|
||||||
|
Text_shellsafe(disk_path, xorriso->info_text, 1);
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
|
{ret= 0; goto ex;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ret= 1 + !!lfa_ia_pushed;
|
ret= 1 + !!lfa_ia_pushed;
|
||||||
ex:;
|
ex:;
|
||||||
iso_node_get_attrs(node, &num_attrs, &names, &value_lengths, &values,1 << 15);
|
iso_node_get_attrs(node, &num_attrs, &names, &value_lengths, &values,1 << 15);
|
||||||
|
@ -2775,7 +2775,7 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
|
|||||||
-options_from_file:${resume_state_file}_pos
|
-options_from_file:${resume_state_file}_pos
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int is_default, no_defaults, i, ret, adr_mode, do_single, behavior;
|
int is_default, no_defaults, i, ret, adr_mode, do_single, behavior, count;
|
||||||
int show_indev= 1, show_outdev= 1, show_dev= 0;
|
int show_indev= 1, show_outdev= 1, show_dev= 0;
|
||||||
int do_drive_access, did_drive_access;
|
int do_drive_access, did_drive_access;
|
||||||
int part_table_implicit= 0;
|
int part_table_implicit= 0;
|
||||||
@ -3862,6 +3862,31 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
|
|||||||
if(!(is_default && no_defaults))
|
if(!(is_default && no_defaults))
|
||||||
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
||||||
|
|
||||||
|
count= Numbermapper_get_count(xorriso->projid_mapper, 0);
|
||||||
|
is_default= (count == 0 && !(xorriso->do_aaip & (1 << 17)));
|
||||||
|
strcpy(line, "-projid ");
|
||||||
|
if(xorriso->do_aaip & (1 << 17))
|
||||||
|
strcat(line, "on");
|
||||||
|
else
|
||||||
|
strcat(line, "off");
|
||||||
|
if(xorriso->do_aaip & (1 << 18))
|
||||||
|
strcat(line, ":restore_0");
|
||||||
|
else
|
||||||
|
strcat(line, ":no_restore_0");
|
||||||
|
strcat(line, "\n");
|
||||||
|
if(!(is_default && no_defaults))
|
||||||
|
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
||||||
|
|
||||||
|
for(i= count - 1; i >= 0; i--) {
|
||||||
|
strcpy(line, "-projid map+");
|
||||||
|
ret= Numbermapper_encode(xorriso->projid_mapper, i, line + strlen(line),
|
||||||
|
1024, 0);
|
||||||
|
if(ret <= 0)
|
||||||
|
continue;
|
||||||
|
strcat(line, "\n");
|
||||||
|
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
||||||
|
}
|
||||||
|
|
||||||
is_default= ((xorriso->do_aaip & (16 | 32 | 64)) == 0);
|
is_default= ((xorriso->do_aaip & (16 | 32 | 64)) == 0);
|
||||||
sprintf(line,"-disk_dev_ino %s\n",
|
sprintf(line,"-disk_dev_ino %s\n",
|
||||||
(xorriso->do_aaip & 16 ? (xorriso->do_aaip & 128 ? "ino_only" : "on" )
|
(xorriso->do_aaip & 16 ? (xorriso->do_aaip & 128 ? "ino_only" : "on" )
|
||||||
@ -4911,3 +4936,14 @@ int Xorriso_set_info_text(struct XorrisO *xorriso, char *text,
|
|||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int Xorriso_show_projid(struct XorrisO *xorriso, char *path, uint32_t projid,
|
||||||
|
int flag)
|
||||||
|
{
|
||||||
|
sprintf(xorriso->result_line, "%10lu ", (unsigned long int) projid);
|
||||||
|
Xorriso_esc_filepath(xorriso, path, xorriso->result_line, 1);
|
||||||
|
strcat(xorriso->result_line, "\n");
|
||||||
|
Xorriso_result(xorriso, 0);
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -912,7 +912,7 @@ int Xorriso_make_iso_write_opts(struct XorrisO *xorriso, IsoImage *image,
|
|||||||
((!!xorriso->do_iso1999) * isoburn_igopt_iso1999) |
|
((!!xorriso->do_iso1999) * isoburn_igopt_iso1999) |
|
||||||
(( !(xorriso->ino_behavior & 2)) * isoburn_igopt_hardlinks) |
|
(( !(xorriso->ino_behavior & 2)) * isoburn_igopt_hardlinks) |
|
||||||
(( (!(xorriso->ino_behavior & 2)) ||
|
(( (!(xorriso->ino_behavior & 2)) ||
|
||||||
(xorriso->do_aaip & (2 | 8 | 16 | 256 | (1 << 11))) ||
|
(xorriso->do_aaip & (2 | 8 | 16 | 256 | (1 << 11) | (1 << 17))) ||
|
||||||
(xorriso->do_md5 & (2 | 4)) ||
|
(xorriso->do_md5 & (2 | 4)) ||
|
||||||
xorriso->do_hfsplus
|
xorriso->do_hfsplus
|
||||||
) * isoburn_igopt_aaip) |
|
) * isoburn_igopt_aaip) |
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
.\" First parameter, NAME, should be all caps
|
.\" First parameter, NAME, should be all caps
|
||||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||||
.\" other parameters are allowed: see man(7), man(1)
|
.\" other parameters are allowed: see man(7), man(1)
|
||||||
.TH XORRISO 1 "Version 1.5.7, Oct 10, 2024"
|
.TH XORRISO 1 "Version 1.5.7, Nov 01, 2024"
|
||||||
.\" Please adjust this date whenever revising the manpage.
|
.\" Please adjust this date whenever revising the manpage.
|
||||||
.\"
|
.\"
|
||||||
.\" Some roff macros, for reference:
|
.\" Some roff macros, for reference:
|
||||||
@ -502,6 +502,19 @@ number grew over the years.
|
|||||||
\fB\-lfa_flags\fR. Its command \-lsattr lists 22 flags the same way as the
|
\fB\-lfa_flags\fR. Its command \-lsattr lists 22 flags the same way as the
|
||||||
program lsattr does. They can be set by xorriso command \-chattr and can be
|
program lsattr does. They can be set by xorriso command \-chattr and can be
|
||||||
enabled by \-lfa_flags for restoring when their files get restored to disk.
|
enabled by \-lfa_flags for restoring when their files get restored to disk.
|
||||||
|
.PP
|
||||||
|
\fBXFS\-style project ids\fR are numbers which define the members of file
|
||||||
|
object groups, called projects. They can be set by programs chattr(1) and
|
||||||
|
xfs_quota(8) and reported by programs lsattr(1) and xfs_quota(8).
|
||||||
|
The files of a project can share quotas which limit their usage of filesystem
|
||||||
|
resources. This is possible in XFS and in specially prepared and mounted ext4
|
||||||
|
filesystems. Project id 0 means that the file is not member of any project.
|
||||||
|
.br
|
||||||
|
\fBxorriso\fR records non\-zero project ids of disk files if enabled by
|
||||||
|
command \fB\-projid\fR. Command \-get_projid lists the project ids of files.
|
||||||
|
They can be set by command \-set_projid and get restored to disk if enabled
|
||||||
|
by \-projid. Usually project id 0 is not set to restored disk files, so that
|
||||||
|
they may get the project id of their parent disk directory.
|
||||||
.SS
|
.SS
|
||||||
.B Command processing:
|
.B Command processing:
|
||||||
.br
|
.br
|
||||||
@ -1145,6 +1158,51 @@ Mode "default" reinstates the default settings:
|
|||||||
.br
|
.br
|
||||||
Use "default:on" to get default settings with enabled processing.
|
Use "default:on" to get default settings with enabled processing.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-projid\fR mode[:mode...]
|
||||||
|
Enable, disable, or influence processing of XFS\-style project ids.
|
||||||
|
.br
|
||||||
|
Mode "on" enables recording and restoring of project ids.
|
||||||
|
.br
|
||||||
|
Mode "off" disables it.
|
||||||
|
.br
|
||||||
|
Mode "restore_0" enables restoring of project id 0 when files get extracted
|
||||||
|
to disk. Default is "no_restore_0" which leaves the decision about the project
|
||||||
|
id to the local filesystem, if the file has project id 0 in the ISO filesystem.
|
||||||
|
.br
|
||||||
|
Mode "map+" defines mappings of project id intervals in the ISO to project id
|
||||||
|
intervals on disk when files get restored. The form is:
|
||||||
|
.br
|
||||||
|
map+low_in_iso,high_in_iso=low_on_disk[,[high_on_disk]]
|
||||||
|
.br
|
||||||
|
"low_in_iso" and "high_in_iso" define the number interval from which the
|
||||||
|
mapping happens at restore time. "low_on_disk" is the mapping result of
|
||||||
|
"low_in_iso". Project id numbers up to "high_in_iso" get mapped to
|
||||||
|
.br
|
||||||
|
low_on_disk + (project_id \- low_in_iso)
|
||||||
|
.br
|
||||||
|
If the resulting number is higher than "high_on_disk", then it gets mapped to
|
||||||
|
"high_on_disk". "low_on_disk" without following comma means
|
||||||
|
"low_on_disk,low_on_disk" which maps the whole "_in_iso" interval to the single
|
||||||
|
number "low_on_disk". "low_on_disk," with no following number means
|
||||||
|
"low_on_disk,4294967295".
|
||||||
|
.br
|
||||||
|
Multiple "map+" modes may be given with one or more \-projid commands.
|
||||||
|
E.g.:
|
||||||
|
.br
|
||||||
|
\-projid on:map+1,1=11,11:map+1000,1999=2000,
|
||||||
|
.br
|
||||||
|
The first match in the list of mappings defines the mapping of a given
|
||||||
|
project id in the ISO.
|
||||||
|
.br
|
||||||
|
Pseudo\-mode "map_test=" can be used to learn the current mapping
|
||||||
|
of the given project number. It immediately reports the mapping result on
|
||||||
|
result channel and does not change the current \-projid settings. E.g.:
|
||||||
|
.br
|
||||||
|
\-projid map_test=1001
|
||||||
|
.br
|
||||||
|
Mode "default" discards all defined mappings and sets \-projid to
|
||||||
|
"off:no_restore_0".
|
||||||
|
.TP
|
||||||
\fB\-md5\fR "on"|"all"|"off"|"load_check_off"
|
\fB\-md5\fR "on"|"all"|"off"|"load_check_off"
|
||||||
Enable or disable processing of MD5 checksums for the overall session and for
|
Enable or disable processing of MD5 checksums for the overall session and for
|
||||||
each single data file. If enabled then images with checksum tags get loaded
|
each single data file. If enabled then images with checksum tags get loaded
|
||||||
@ -1185,7 +1243,7 @@ actions get_md5, check_md5, and via \-check_media.
|
|||||||
Enable all extra features which help to produce or to restore backups with
|
Enable all extra features which help to produce or to restore backups with
|
||||||
highest fidelity of file properties. Currently this is a shortcut for:
|
highest fidelity of file properties. Currently this is a shortcut for:
|
||||||
.br
|
.br
|
||||||
\-hardlinks on \-acl on \-xattr any \-md5 on
|
\-hardlinks on \-acl on \-xattr any \-md5 on \-projid on
|
||||||
.br
|
.br
|
||||||
and possibly:
|
and possibly:
|
||||||
.br
|
.br
|
||||||
@ -2092,6 +2150,14 @@ to be directories or regular data files or else a SORRY event will happen.
|
|||||||
Files below the given directories will be skipped silently if their type is
|
Files below the given directories will be skipped silently if their type is
|
||||||
not suitable for \-chattr.
|
not suitable for \-chattr.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-set_projid\fR number iso_rr_path [***]
|
||||||
|
Set the XFS\-style project ids like programs xfs_quota(8) or chattr(1)
|
||||||
|
would do to disk files. The permissible number range is 0 to 4294967295.
|
||||||
|
0 means that the file does not belong to any project.
|
||||||
|
.TP
|
||||||
|
\fB\-set_projid_r\fR number iso_rr_path [***]
|
||||||
|
Like \-projid but affecting also all files below the given directories.
|
||||||
|
.TP
|
||||||
\fB\-alter_date\fR type timestring iso_rr_path [***]
|
\fB\-alter_date\fR type timestring iso_rr_path [***]
|
||||||
Alter the date entries of files in the ISO image. type may be one of
|
Alter the date entries of files in the ISO image. type may be one of
|
||||||
the following:
|
the following:
|
||||||
@ -2279,6 +2345,9 @@ Matches files which have a non\-trivial ACL.
|
|||||||
\fB\-has_xattr\fR :
|
\fB\-has_xattr\fR :
|
||||||
Matches files which have xattr name\-value pairs from user namespace.
|
Matches files which have xattr name\-value pairs from user namespace.
|
||||||
.br
|
.br
|
||||||
|
\fB\-has_any_xattr\fR :
|
||||||
|
Matches files which have any xattr other than ACL.
|
||||||
|
.br
|
||||||
\fB\-has_aaip\fR :
|
\fB\-has_aaip\fR :
|
||||||
Matches files which have ACL or any xattr.
|
Matches files which have ACL or any xattr.
|
||||||
.br
|
.br
|
||||||
@ -2301,8 +2370,8 @@ E.g. look for files which have 'i' or 'a' or both of them set:
|
|||||||
.br
|
.br
|
||||||
\-has_some_lfa_flags_of ia
|
\-has_some_lfa_flags_of ia
|
||||||
.br
|
.br
|
||||||
\fB\-has_any_xattr\fR :
|
\fB\-has_projid\fR number :
|
||||||
Matches files which have any xattr other than ACL.
|
Matches files which bear the given XFS\-style project id number.
|
||||||
.br
|
.br
|
||||||
\fB\-has_md5\fR :
|
\fB\-has_md5\fR :
|
||||||
Matches data files which have MD5 checksums.
|
Matches data files which have MD5 checksums.
|
||||||
@ -2536,12 +2605,24 @@ Command \-backslash_codes does not affect the output.
|
|||||||
\fBlsattrd\fR
|
\fBlsattrd\fR
|
||||||
shows the Linux file attribute flags like command \-lsattrd does.
|
shows the Linux file attribute flags like command \-lsattrd does.
|
||||||
.br
|
.br
|
||||||
\fBchattr\fR
|
\fBchattr\fR mode
|
||||||
applies \-chattr with the given mode. Other than command \-chattr this silently
|
applies \-chattr with the given mode. Other than command \-chattr this silently
|
||||||
skips any file which are not \-type "dir" or "file".
|
skips any file which are not \-type "dir" or "file".
|
||||||
.br
|
.br
|
||||||
E.g.: \-exec chattr +sDu \-\-
|
E.g.: \-exec chattr +sDu \-\-
|
||||||
.br
|
.br
|
||||||
|
\fBget_projid\fR
|
||||||
|
shows the XFS\-style project id number.
|
||||||
|
.br
|
||||||
|
\fBget_projid_minmax\fR
|
||||||
|
shows at the end of the \-find run the minimal and the maximal XFS\-style
|
||||||
|
project id numbers among the files which were matched by the find tests.
|
||||||
|
.br
|
||||||
|
\fBset_projid\fR number
|
||||||
|
applies \-set_projid with the given number. Number range is 0 to 4294967295.
|
||||||
|
.br
|
||||||
|
E.g.: \-exec set_projid 1001 \-\-
|
||||||
|
.br
|
||||||
\fBget_md5\fR
|
\fBget_md5\fR
|
||||||
prints the MD5 sum, if recorded, together with file path.
|
prints the MD5 sum, if recorded, together with file path.
|
||||||
.br
|
.br
|
||||||
@ -5119,6 +5200,14 @@ attributes attached. In this case all flags will be shown as '\-'.
|
|||||||
Like \-lsattr but listing the directory attributes if the iso_rr_path leads to
|
Like \-lsattr but listing the directory attributes if the iso_rr_path leads to
|
||||||
a directory, rather than the attributes of the files in the directory.
|
a directory, rather than the attributes of the files in the directory.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-get_projid\fR iso_rr_pattern [***]
|
||||||
|
Print the XFS\-style project ids of the given file objects. On disk this
|
||||||
|
information can be inspected by programs lsattr(1) or xfs_quota(8).
|
||||||
|
.TP
|
||||||
|
\fB\-get_projid_r\fR iso_rr_pattern [***]
|
||||||
|
Like \-get_projid but listing recursively the whole file trees underneath of
|
||||||
|
directories.
|
||||||
|
.TP
|
||||||
\fB\-du\fR iso_rr_pattern [***]
|
\fB\-du\fR iso_rr_pattern [***]
|
||||||
Recursively list size of directories and files in the ISO image
|
Recursively list size of directories and files in the ISO image
|
||||||
which match one of the patterns.
|
which match one of the patterns.
|
||||||
@ -5147,8 +5236,8 @@ like described with \-find:
|
|||||||
.br
|
.br
|
||||||
\-bad_outname, \-decision, \-disk_name, \-disk_path, \-has_acl,
|
\-bad_outname, \-decision, \-disk_name, \-disk_path, \-has_acl,
|
||||||
\-has_any_xattr, \-has_lfa_flags, \-has_some_lfa_flags_of,
|
\-has_any_xattr, \-has_lfa_flags, \-has_some_lfa_flags_of,
|
||||||
\-has_xattr, \-lba_range, \-maxdepth, \-mindepth, \-name,
|
\-has_projid, \-has_xattr, \-lba_range, \-maxdepth, \-mindepth,
|
||||||
\-or_use_pattern, \-prune, \-size, \-true, \-type,
|
\-name, \-or_use_pattern, \-prune, \-size, \-true, \-type,
|
||||||
\-use_pattern, \-wholename
|
\-use_pattern, \-wholename
|
||||||
.br
|
.br
|
||||||
The others get defaulted to \-false, because they are not applicable to disk
|
The others get defaulted to \-false, because they are not applicable to disk
|
||||||
@ -5230,9 +5319,17 @@ See \-find for a description of parameter mode.
|
|||||||
E.g. \-exec list_extattr e \-\-
|
E.g. \-exec list_extattr e \-\-
|
||||||
.br
|
.br
|
||||||
\fBlsattrd\fR
|
\fBlsattrd\fR
|
||||||
prints the Linux file attribute flags like command \-lsattrd does.
|
prints to the result channel the Linux file attribute flags like
|
||||||
|
command \-lsattrd does.
|
||||||
This shows non\-settable flags, too, even if they are to be ignored by the
|
This shows non\-settable flags, too, even if they are to be ignored by the
|
||||||
setting of command \-lfa_flags.
|
setting of command \-lfa_flags.
|
||||||
|
.br
|
||||||
|
\fBget_projid\fR
|
||||||
|
prints the XFS\-style project id number to the result channel.
|
||||||
|
.br
|
||||||
|
\fBget_projid_minmax\fR
|
||||||
|
prints at the end of the \-findx run the minimal and the maximal XFS\-style
|
||||||
|
project id numbers among the files which were matched by the find tests.
|
||||||
.TP
|
.TP
|
||||||
\fB\-compare\fR disk_path iso_rr_path
|
\fB\-compare\fR disk_path iso_rr_path
|
||||||
Compare attributes and eventual data file content of a fileobject in the
|
Compare attributes and eventual data file content of a fileobject in the
|
||||||
@ -6041,7 +6138,12 @@ Print helptext.
|
|||||||
Print program name and version, component versions, license.
|
Print program name and version, component versions, license.
|
||||||
.TP
|
.TP
|
||||||
\fB\-list_extras\fR code
|
\fB\-list_extras\fR code
|
||||||
Tell whether certain extra features were enabled at compile time.
|
Tell whether certain extra features were enabled at compile time and the
|
||||||
|
environment provided the necessary system interfaces.
|
||||||
|
Application of the enabled features might fail at run time because the system
|
||||||
|
does not provide the necessary interfaces or the involved local filesystem
|
||||||
|
does not provide the desired feature.
|
||||||
|
.br
|
||||||
Code "all" lists all features and a headline.
|
Code "all" lists all features and a headline.
|
||||||
Other codes pick a single feature.
|
Other codes pick a single feature.
|
||||||
Code "codes" lists them. They share names with related commands
|
Code "codes" lists them. They share names with related commands
|
||||||
@ -6054,6 +6156,8 @@ Code "codes" lists them. They share names with related commands
|
|||||||
"lfa_flags" tells whether xorriso has an adapter for local Linux file
|
"lfa_flags" tells whether xorriso has an adapter for local Linux file
|
||||||
attributes (see man 1 chattr).
|
attributes (see man 1 chattr).
|
||||||
.br
|
.br
|
||||||
|
"projid" tells whether xorriso has an adapter for local XFS\-style project ids.
|
||||||
|
.br
|
||||||
"jigdo" tells whether production of Jigdo files is possible.
|
"jigdo" tells whether production of Jigdo files is possible.
|
||||||
.br
|
.br
|
||||||
"zisofs" tells whether zisofs and built\-in gzip filters are enabled.
|
"zisofs" tells whether zisofs and built\-in gzip filters are enabled.
|
||||||
@ -7063,13 +7167,15 @@ Other programs which burn sessions to optical media
|
|||||||
.BR wodim(1),
|
.BR wodim(1),
|
||||||
.BR cdrskin(1)
|
.BR cdrskin(1)
|
||||||
.TP
|
.TP
|
||||||
ACL, xattr, Linux file attributes
|
ACL, xattr, Linux file attributes, project ids
|
||||||
.BR getfacl(1),
|
.BR getfacl(1),
|
||||||
.BR setfacl(1),
|
.BR setfacl(1),
|
||||||
.BR getfattr(1),
|
.BR getfattr(1),
|
||||||
.BR setfattr(1),
|
.BR setfattr(1),
|
||||||
.BR lsattr(1),
|
.BR lsattr(1),
|
||||||
.BR chattr(1)
|
.BR chattr(1),
|
||||||
|
.BR ext4(5),
|
||||||
|
.BR xfs_quota(8)
|
||||||
.TP
|
.TP
|
||||||
MD5 checksums
|
MD5 checksums
|
||||||
.BR md5sum(1)
|
.BR md5sum(1)
|
||||||
|
@ -1631,12 +1631,15 @@ int Xorriso_option_follow(struct XorrisO *xorriso, char *mode, int flag);
|
|||||||
Xorriso_option_md5(xorriso, "on", 0);
|
Xorriso_option_md5(xorriso, "on", 0);
|
||||||
Xorriso_option_lfa_flags(xorriso,
|
Xorriso_option_lfa_flags(xorriso,
|
||||||
"default:on:restore_mask=aAcCdDijmPsStTux", 0);
|
"default:on:restore_mask=aAcCdDijmPsStTux", 0);
|
||||||
|
Xorriso_option_projid(xorriso, "on", 0);
|
||||||
*/
|
*/
|
||||||
/* @since 0.4.0 */
|
/* @since 0.4.0 */
|
||||||
/* xattr "any"
|
/* xattr "any"
|
||||||
@since 1.5.0
|
@since 1.5.0
|
||||||
lfa_flags "default:on:restore_mask=aAcCdDijmPsStTux"
|
lfa_flags "default:on:restore_mask=aAcCdDijmPsStTux"
|
||||||
@since 1.5.8
|
@since 1.5.8
|
||||||
|
projid on
|
||||||
|
@since 1.5.8
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Command -for_backup */
|
/* Command -for_backup */
|
||||||
@ -1653,6 +1656,14 @@ int Xorriso_option_fs(struct XorrisO *xorriso, char *size, int flag);
|
|||||||
int Xorriso_option_genisoimage_completion(struct XorrisO *xorriso,
|
int Xorriso_option_genisoimage_completion(struct XorrisO *xorriso,
|
||||||
char *mode, int flag);
|
char *mode, int flag);
|
||||||
|
|
||||||
|
/* Commands -get_projid alias get_projidi
|
||||||
|
-get_projid_r alias -get_projid_ri */
|
||||||
|
/* @param flag bit0=recursive -get_projid_r
|
||||||
|
*/
|
||||||
|
/* @since 1.5.8 */
|
||||||
|
int Xorriso_option_get_projid(struct XorrisO *xorriso,
|
||||||
|
int argc, char **argv, int *idx, int flag);
|
||||||
|
|
||||||
/* Commands -getfacl alias -getfacli, -getfacl_r alias -getfacl_ri
|
/* Commands -getfacl alias -getfacli, -getfacl_r alias -getfacl_ri
|
||||||
-getfattr alias getfattri
|
-getfattr alias getfattri
|
||||||
*/
|
*/
|
||||||
@ -1986,6 +1997,10 @@ int Xorriso_option_prompt(struct XorrisO *xorriso, char *text, int flag);
|
|||||||
/* @since 0.1.0 */
|
/* @since 0.1.0 */
|
||||||
int Xorriso_option_prog_help(struct XorrisO *xorriso, char *name, int flag);
|
int Xorriso_option_prog_help(struct XorrisO *xorriso, char *name, int flag);
|
||||||
|
|
||||||
|
/* Command -projid */
|
||||||
|
/* @since 1.5.8 */
|
||||||
|
int Xorriso_option_projid(struct XorrisO *xorriso, char *mode, int flag);
|
||||||
|
|
||||||
/* Command -publisher */
|
/* Command -publisher */
|
||||||
/* @since 0.1.2 */
|
/* @since 0.1.2 */
|
||||||
int Xorriso_option_publisher(struct XorrisO *xorriso, char *name, int flag);
|
int Xorriso_option_publisher(struct XorrisO *xorriso, char *name, int flag);
|
||||||
@ -2079,6 +2094,13 @@ int Xorriso_option_scsi_log(struct XorrisO *xorriso, char *mode, int flag);
|
|||||||
/* @since 0.1.4 */
|
/* @since 0.1.4 */
|
||||||
int Xorriso_option_session_log(struct XorrisO *xorriso, char *path, int flag);
|
int Xorriso_option_session_log(struct XorrisO *xorriso, char *path, int flag);
|
||||||
|
|
||||||
|
/* Commands -set_projid alias -set_projidi
|
||||||
|
-set_projid_r alias -set_projid_ri */
|
||||||
|
/* @param flag bit0=recursive -set_projid_r */
|
||||||
|
/* @since 1.5.8 */
|
||||||
|
int Xorriso_option_set_projid(struct XorrisO *xorriso, char *projid_text,
|
||||||
|
int argc, char **argv, int *idx, int flag);
|
||||||
|
|
||||||
/* Command -setfacl_list alias -setfacl_listi */
|
/* Command -setfacl_list alias -setfacl_listi */
|
||||||
/* @since 0.3.4 */
|
/* @since 0.3.4 */
|
||||||
int Xorriso_option_setfacl_listi(struct XorrisO *xorriso, char *disk_path,
|
int Xorriso_option_setfacl_listi(struct XorrisO *xorriso, char *disk_path,
|
||||||
|
@ -435,7 +435,19 @@ grew over the years.
|
|||||||
*-lfa_flags*. Its command -lsattr lists 22 flags the same way as the
|
*-lfa_flags*. Its command -lsattr lists 22 flags the same way as the
|
||||||
program lsattr does. They can be set by xorriso command -chattr and can
|
program lsattr does. They can be set by xorriso command -chattr and can
|
||||||
be enabled by -lfa_flags for restoring when their files get restored to
|
be enabled by -lfa_flags for restoring when their files get restored to
|
||||||
disk.
|
disk. *XFS-style project ids* are numbers which define the members of
|
||||||
|
file object groups, called projects. They can be set by programs
|
||||||
|
chattr(1) and xfs_quota(8) and reported by programs lsattr(1) and
|
||||||
|
xfs_quota(8). The files of a project can share quotas which limit their
|
||||||
|
usage of filesystem resources. This is possible in XFS and in specially
|
||||||
|
prepared and mounted ext4 filesystems. Project id 0 means that the file
|
||||||
|
is not member of any project.
|
||||||
|
'xorriso' records non-zero project ids of disk files if enabled by
|
||||||
|
command *-projid*. Command -get_projid lists the project ids of files.
|
||||||
|
They can be set by command -set_projid and get restored to disk if
|
||||||
|
enabled by -projid. Usually project id 0 is not set to restored disk
|
||||||
|
files, so that they may get the project id of their parent disk
|
||||||
|
directory.
|
||||||
|
|
||||||
|
|
||||||
File: xorriso.info, Node: Processing, Next: Dialog, Prev: Extras, Up: Top
|
File: xorriso.info, Node: Processing, Next: Dialog, Prev: Extras, Up: Top
|
||||||
@ -1022,6 +1034,40 @@ activate them only after image loading.
|
|||||||
-lfa_flags off:read:restore:restore_su_auto:restore_only_known
|
-lfa_flags off:read:restore:restore_su_auto:restore_only_known
|
||||||
-lfa_flags restore_mask=:restore_error=sorry:restore_single
|
-lfa_flags restore_mask=:restore_error=sorry:restore_single
|
||||||
Use "default:on" to get default settings with enabled processing.
|
Use "default:on" to get default settings with enabled processing.
|
||||||
|
-projid mode[:mode...]
|
||||||
|
Enable, disable, or influence processing of XFS-style project ids.
|
||||||
|
Mode "on" enables recording and restoring of project ids.
|
||||||
|
Mode "off" disables it.
|
||||||
|
Mode "restore_0" enables restoring of project id 0 when files get
|
||||||
|
extracted to disk. Default is "no_restore_0" which leaves the
|
||||||
|
decision about the project id to the local filesystem, if the file
|
||||||
|
has project id 0 in the ISO filesystem.
|
||||||
|
Mode "map+" defines mappings of project id intervals in the ISO to
|
||||||
|
project id intervals on disk when files get restored. The form is:
|
||||||
|
|
||||||
|
map+low_in_iso,high_in_iso=low_on_disk[,[high_on_disk]]
|
||||||
|
"low_in_iso" and "high_in_iso" define the number interval from
|
||||||
|
which the mapping happens at restore time. "low_on_disk" is the
|
||||||
|
mapping result of "low_in_iso". Project id numbers up to
|
||||||
|
"high_in_iso" get mapped to
|
||||||
|
low_on_disk + (project_id - low_in_iso)
|
||||||
|
If the resulting number is higher than "high_on_disk", then it gets
|
||||||
|
mapped to "high_on_disk". "low_on_disk" without following comma
|
||||||
|
means "low_on_disk,low_on_disk" which maps the whole "_in_iso"
|
||||||
|
interval to the single number "low_on_disk". "low_on_disk," with
|
||||||
|
no following number means "low_on_disk,4294967295".
|
||||||
|
Multiple "map+" modes may be given with one or more -projid
|
||||||
|
commands. E.g.:
|
||||||
|
-projid on:map+1,1=11,11:map+1000,1999=2000,
|
||||||
|
The first match in the list of mappings defines the mapping of a
|
||||||
|
given project id in the ISO.
|
||||||
|
Pseudo-mode "map_test=" can be used to learn the current mapping of
|
||||||
|
the given project number. It immediately reports the mapping
|
||||||
|
result on result channel and does not change the current -projid
|
||||||
|
settings. E.g.:
|
||||||
|
-projid map_test=1001
|
||||||
|
Mode "default" discards all defined mappings and sets -projid to
|
||||||
|
"off:no_restore_0".
|
||||||
-md5 "on"|"all"|"off"|"load_check_off"
|
-md5 "on"|"all"|"off"|"load_check_off"
|
||||||
Enable or disable processing of MD5 checksums for the overall
|
Enable or disable processing of MD5 checksums for the overall
|
||||||
session and for each single data file. If enabled then images with
|
session and for each single data file. If enabled then images with
|
||||||
@ -1057,7 +1103,7 @@ activate them only after image loading.
|
|||||||
Enable all extra features which help to produce or to restore
|
Enable all extra features which help to produce or to restore
|
||||||
backups with highest fidelity of file properties. Currently this
|
backups with highest fidelity of file properties. Currently this
|
||||||
is a shortcut for:
|
is a shortcut for:
|
||||||
-hardlinks on -acl on -xattr any -md5 on
|
-hardlinks on -acl on -xattr any -md5 on -projid on
|
||||||
and possibly:
|
and possibly:
|
||||||
-lfa_flags default:on:import_only_settable
|
-lfa_flags default:on:import_only_settable
|
||||||
-lfa_flags restore_mask=aAcdDijmPsStTux
|
-lfa_flags restore_mask=aAcdDijmPsStTux
|
||||||
@ -1807,6 +1853,14 @@ whether they stem from the loaded image or were newly inserted.
|
|||||||
or else a SORRY event will happen. Files below the given
|
or else a SORRY event will happen. Files below the given
|
||||||
directories will be skipped silently if their type is not suitable
|
directories will be skipped silently if their type is not suitable
|
||||||
for -chattr.
|
for -chattr.
|
||||||
|
-set_projid number iso_rr_path [***]
|
||||||
|
Set the XFS-style project ids like programs xfs_quota(8) or
|
||||||
|
chattr(1) would do to disk files. The permissible number range is
|
||||||
|
0 to 4294967295. 0 means that the file does not belong to any
|
||||||
|
project.
|
||||||
|
-set_projid_r number iso_rr_path [***]
|
||||||
|
Like -projid but affecting also all files below the given
|
||||||
|
directories.
|
||||||
-alter_date type timestring iso_rr_path [***]
|
-alter_date type timestring iso_rr_path [***]
|
||||||
Alter the date entries of files in the ISO image. type may be one
|
Alter the date entries of files in the ISO image. type may be one
|
||||||
of the following:
|
of the following:
|
||||||
@ -1953,6 +2007,8 @@ File: xorriso.info, Node: CmdFind, Next: Filter, Prev: Manip, Up: Commands
|
|||||||
-has_xattr :
|
-has_xattr :
|
||||||
Matches files which have xattr name-value pairs from user
|
Matches files which have xattr name-value pairs from user
|
||||||
namespace.
|
namespace.
|
||||||
|
-has_any_xattr :
|
||||||
|
Matches files which have any xattr other than ACL.
|
||||||
-has_aaip :
|
-has_aaip :
|
||||||
Matches files which have ACL or any xattr.
|
Matches files which have ACL or any xattr.
|
||||||
-has_lfa_flags flag_letters :
|
-has_lfa_flags flag_letters :
|
||||||
@ -1973,8 +2029,9 @@ File: xorriso.info, Node: CmdFind, Next: Filter, Prev: Manip, Up: Commands
|
|||||||
matches any file. E.g. look for files which have 'i' or 'a'
|
matches any file. E.g. look for files which have 'i' or 'a'
|
||||||
or both of them set:
|
or both of them set:
|
||||||
-has_some_lfa_flags_of ia
|
-has_some_lfa_flags_of ia
|
||||||
-has_any_xattr :
|
-has_projid number :
|
||||||
Matches files which have any xattr other than ACL.
|
Matches files which bear the given XFS-style project id
|
||||||
|
number.
|
||||||
-has_md5 :
|
-has_md5 :
|
||||||
Matches data files which have MD5 checksums.
|
Matches data files which have MD5 checksums.
|
||||||
-has_hfs_crtp creator type :
|
-has_hfs_crtp creator type :
|
||||||
@ -2172,11 +2229,21 @@ File: xorriso.info, Node: CmdFind, Next: Filter, Prev: Manip, Up: Commands
|
|||||||
lsattrd
|
lsattrd
|
||||||
shows the Linux file attribute flags like command -lsattrd
|
shows the Linux file attribute flags like command -lsattrd
|
||||||
does.
|
does.
|
||||||
chattr
|
chattr mode
|
||||||
applies -chattr with the given mode. Other than command
|
applies -chattr with the given mode. Other than command
|
||||||
-chattr this silently skips any file which are not -type "dir"
|
-chattr this silently skips any file which are not -type "dir"
|
||||||
or "file".
|
or "file".
|
||||||
E.g.: -exec chattr +sDu -
|
E.g.: -exec chattr +sDu -
|
||||||
|
get_projid
|
||||||
|
shows the XFS-style project id number.
|
||||||
|
get_projid_minmax
|
||||||
|
shows at the end of the -find run the minimal and the maximal
|
||||||
|
XFS-style project id numbers among the files which were
|
||||||
|
matched by the find tests.
|
||||||
|
set_projid number
|
||||||
|
applies -set_projid with the given number. Number range is 0
|
||||||
|
to 4294967295.
|
||||||
|
E.g.: -exec set_projid 1001 -
|
||||||
get_md5
|
get_md5
|
||||||
prints the MD5 sum, if recorded, together with file path.
|
prints the MD5 sum, if recorded, together with file path.
|
||||||
check_md5
|
check_md5
|
||||||
@ -4303,6 +4370,13 @@ File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Command
|
|||||||
Like -lsattr but listing the directory attributes if the
|
Like -lsattr but listing the directory attributes if the
|
||||||
iso_rr_path leads to a directory, rather than the attributes of the
|
iso_rr_path leads to a directory, rather than the attributes of the
|
||||||
files in the directory.
|
files in the directory.
|
||||||
|
-get_projid iso_rr_pattern [***]
|
||||||
|
Print the XFS-style project ids of the given file objects. On disk
|
||||||
|
this information can be inspected by programs lsattr(1) or
|
||||||
|
xfs_quota(8).
|
||||||
|
-get_projid_r iso_rr_pattern [***]
|
||||||
|
Like -get_projid but listing recursively the whole file trees
|
||||||
|
underneath of directories.
|
||||||
-du iso_rr_pattern [***]
|
-du iso_rr_pattern [***]
|
||||||
Recursively list size of directories and files in the ISO image
|
Recursively list size of directories and files in the ISO image
|
||||||
which match one of the patterns. similar to shell command du -k.
|
which match one of the patterns. similar to shell command du -k.
|
||||||
@ -4322,9 +4396,10 @@ File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Command
|
|||||||
-findx accepts the same tests as -find, but only the following ones
|
-findx accepts the same tests as -find, but only the following ones
|
||||||
work like described with -find:
|
work like described with -find:
|
||||||
-bad_outname, -decision, -disk_name, -disk_path, -has_acl,
|
-bad_outname, -decision, -disk_name, -disk_path, -has_acl,
|
||||||
-has_any_xattr, -has_lfa_flags, -has_some_lfa_flags_of, -has_xattr,
|
-has_any_xattr, -has_lfa_flags, -has_some_lfa_flags_of,
|
||||||
-lba_range, -maxdepth, -mindepth, -name, -or_use_pattern, -prune,
|
-has_projid, -has_xattr, -lba_range, -maxdepth, -mindepth, -name,
|
||||||
-size, -true, -type, -use_pattern, -wholename
|
-or_use_pattern, -prune, -size, -true, -type, -use_pattern,
|
||||||
|
-wholename
|
||||||
The others get defaulted to -false, because they are not applicable
|
The others get defaulted to -false, because they are not applicable
|
||||||
to disk files.
|
to disk files.
|
||||||
Test -type accepts the same parameters as with -find. Additionally
|
Test -type accepts the same parameters as with -find. Additionally
|
||||||
@ -4392,9 +4467,17 @@ File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Command
|
|||||||
mode.
|
mode.
|
||||||
E.g. -exec list_extattr e -
|
E.g. -exec list_extattr e -
|
||||||
lsattrd
|
lsattrd
|
||||||
prints the Linux file attribute flags like command -lsattrd
|
prints to the result channel the Linux file attribute flags
|
||||||
does. This shows non-settable flags, too, even if they are to
|
like command -lsattrd does. This shows non-settable flags,
|
||||||
be ignored by the setting of command -lfa_flags.
|
too, even if they are to be ignored by the setting of command
|
||||||
|
-lfa_flags.
|
||||||
|
get_projid
|
||||||
|
prints the XFS-style project id number to the result channel.
|
||||||
|
|
||||||
|
get_projid_minmax
|
||||||
|
prints at the end of the -findx run the minimal and the maximal
|
||||||
|
XFS-style project id numbers among the files which were matched by
|
||||||
|
the find tests.
|
||||||
-compare disk_path iso_rr_path
|
-compare disk_path iso_rr_path
|
||||||
Compare attributes and eventual data file content of a fileobject
|
Compare attributes and eventual data file content of a fileobject
|
||||||
in the local filesystem with a file object in the ISO image. The
|
in the local filesystem with a file object in the ISO image. The
|
||||||
@ -5080,7 +5163,11 @@ File: xorriso.info, Node: Scripting, Next: Frontend, Prev: Emulation, Up: Co
|
|||||||
-version
|
-version
|
||||||
Print program name and version, component versions, license.
|
Print program name and version, component versions, license.
|
||||||
-list_extras code
|
-list_extras code
|
||||||
Tell whether certain extra features were enabled at compile time.
|
Tell whether certain extra features were enabled at compile time
|
||||||
|
and the environment provided the necessary system interfaces.
|
||||||
|
Application of the enabled features might fail at run time because
|
||||||
|
the system does not provide the necessary interfaces or the
|
||||||
|
involved local filesystem does not provide the desired feature.
|
||||||
Code "all" lists all features and a headline. Other codes pick a
|
Code "all" lists all features and a headline. Other codes pick a
|
||||||
single feature. Code "codes" lists them. They share names with
|
single feature. Code "codes" lists them. They share names with
|
||||||
related commands (see also there):
|
related commands (see also there):
|
||||||
@ -5090,6 +5177,8 @@ File: xorriso.info, Node: Scripting, Next: Frontend, Prev: Emulation, Up: Co
|
|||||||
EA.
|
EA.
|
||||||
"lfa_flags" tells whether xorriso has an adapter for local Linux
|
"lfa_flags" tells whether xorriso has an adapter for local Linux
|
||||||
file attributes (see man 1 chattr).
|
file attributes (see man 1 chattr).
|
||||||
|
"projid" tells whether xorriso has an adapter for local XFS-style
|
||||||
|
project ids.
|
||||||
"jigdo" tells whether production of Jigdo files is possible.
|
"jigdo" tells whether production of Jigdo files is possible.
|
||||||
"zisofs" tells whether zisofs and built-in gzip filters are
|
"zisofs" tells whether zisofs and built-in gzip filters are
|
||||||
enabled.
|
enabled.
|
||||||
@ -5965,9 +6054,9 @@ Other programs which produce ISO 9660 images
|
|||||||
mkisofs(8), genisoimage(1)
|
mkisofs(8), genisoimage(1)
|
||||||
Other programs which burn sessions to optical media
|
Other programs which burn sessions to optical media
|
||||||
growisofs(1), cdrecord(1), wodim(1), cdrskin(1)
|
growisofs(1), cdrecord(1), wodim(1), cdrskin(1)
|
||||||
ACL, xattr, Linux file attributes
|
ACL, xattr, Linux file attributes, project ids
|
||||||
getfacl(1), setfacl(1), getfattr(1), setfattr(1), lsattr(1),
|
getfacl(1), setfacl(1), getfattr(1), setfattr(1), lsattr(1),
|
||||||
chattr(1)
|
chattr(1), ext4(5), xfs_quota(8)
|
||||||
MD5 checksums
|
MD5 checksums
|
||||||
md5sum(1)
|
md5sum(1)
|
||||||
On FreeBSD some commands differ:
|
On FreeBSD some commands differ:
|
||||||
@ -6030,14 +6119,14 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
|||||||
|