New -osirrox option strict_acl

This commit is contained in:
2011-08-23 10:42:01 +00:00
parent 4250d805a9
commit 7b6e14a2bf
11 changed files with 181 additions and 104 deletions

View File

@ -1250,30 +1250,34 @@ int Xorriso_option_osirrox(struct XorrisO *xorriso, char *mode, int flag)
l= npt-cpt;
if(l==0 && mode[0]!=0)
goto unknown_mode;
if(strncmp(cpt, "off", l)==0)
if(strncmp(cpt, "off", l)==0 && l >= 3)
allow_restore= 0;
else if(strncmp(cpt, "banned", l)==0)
else if(strncmp(cpt, "banned", l)==0 && l >= 5)
allow_restore= -1;
else if(strncmp(cpt, "device_files", l)==0)
else if(strncmp(cpt, "device_files", l)==0 && l >= 12)
allow_restore= 2;
else if(strncmp(cpt, "on", l)==0 || mode[0]==0)
else if((strncmp(cpt, "on", l)==0 && l >= 2) || mode[0]==0)
allow_restore= 1;
else if(strncmp(cpt, "concat_split_on", l)==0)
else if(strncmp(cpt, "concat_split_on", l)==0 && l >= 15)
xorriso->do_concat_split= 1;
else if(strncmp(cpt, "concat_split_off", l)==0)
else if(strncmp(cpt, "concat_split_off", l)==0 && l >= 16)
xorriso->do_concat_split= 0;
else if(strncmp(cpt, "auto_chmod_on", l)==0)
else if(strncmp(cpt, "auto_chmod_on", l)==0 && l >= 13)
xorriso->do_auto_chmod= 1;
else if(strncmp(cpt, "auto_chmod_off", l)==0)
else if(strncmp(cpt, "auto_chmod_off", l)==0 && l >= 14)
xorriso->do_auto_chmod= 0;
else if(strncmp(cpt, "sort_lba_on", l)==0)
else if(strncmp(cpt, "sort_lba_on", l)==0 && l >= 11)
xorriso->do_restore_sort_lba= 1;
else if(strncmp(cpt, "sort_lba_off", l)==0)
else if(strncmp(cpt, "sort_lba_off", l)==0 && l >= 12)
xorriso->do_restore_sort_lba= 0;
else if(strncmp(cpt, "o_excl_off", l)==0)
xorriso->drives_exclusive= 0;
else if(strncmp(cpt, "o_excl_on", l)==0)
else if(strncmp(cpt, "o_excl_on", l)==0 && l >= 9)
xorriso->drives_exclusive= 1;
else if(strncmp(cpt, "o_excl_off", l)==0 && l >= 10)
xorriso->drives_exclusive= 0;
else if(strncmp(cpt, "strict_acl_on", l)==0 && l >= 13)
xorriso->do_strict_acl|= 1;
else if(strncmp(cpt, "strict_acl_off", l)==0 && l >= 14)
xorriso->do_strict_acl&= ~1;
else {
unknown_mode:;
sprintf(xorriso->info_text, "-osirrox: unknown mode '%s'", cpt);