diff --git a/xorriso/aux_objects.c b/xorriso/aux_objects.c index ae71eb42..37d99c3e 100644 --- a/xorriso/aux_objects.c +++ b/xorriso/aux_objects.c @@ -13,6 +13,8 @@ - ExclusionS which manages the list of excluded file paths and leaf patterns. + Because of its structural identity it is also used for disk address + oriented hiding at insert time as of mkisofs. - Xorriso_lsT which provides a generic double-linked list. @@ -772,7 +774,7 @@ int Exclusions_match(struct ExclusionS *o, char *abs_path, int flag) /* determine leafname */ was_non_slash= 0; - for(leaf_pt= abs_path+strlen(abs_path); leaf_pt>abs_path; leaf_pt--) { + for(leaf_pt= abs_path+strlen(abs_path); leaf_pt >= abs_path; leaf_pt--) { if(*leaf_pt=='/') { if(was_non_slash) { leaf_pt++; diff --git a/xorriso/base_obj.c b/xorriso/base_obj.c index 0b892127..cfd17c42 100644 --- a/xorriso/base_obj.c +++ b/xorriso/base_obj.c @@ -223,6 +223,8 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag) m->temp_mem_limit= 16*1024*1024; m->file_size_limit= Xorriso_default_file_size_limiT; m->disk_exclusions= NULL; + m->iso_rr_hidings= NULL; + m->joliet_hidings= NULL; m->disk_excl_mode= 1; m->use_stdin= 0; m->result_page_length= 0; @@ -334,6 +336,12 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag) m->pacifier_style= 2; } ret= Exclusions_new(&(m->disk_exclusions), 0); + if(ret<=0) + goto failure; + ret= Exclusions_new(&(m->iso_rr_hidings), 0); + if(ret<=0) + goto failure; + ret= Exclusions_new(&(m->joliet_hidings), 0); if(ret<=0) goto failure; Xorriso_relax_compliance(m, "default", 0); @@ -390,6 +398,8 @@ int Xorriso_destroy(struct XorrisO **xorriso, int flag) free(m->out_charset); Xorriso_destroy_re(m,0); Exclusions_destroy(&(m->disk_exclusions), 0); + Exclusions_destroy(&(m->iso_rr_hidings), 0); + Exclusions_destroy(&(m->joliet_hidings), 0); Xorriso_destroy_all_extf(m, 0); Xorriso_lst_destroy_all(&(m->drive_blacklist), 0); Xorriso_lst_destroy_all(&(m->drive_greylist), 0); diff --git a/xorriso/disk_ops.c b/xorriso/disk_ops.c index aa817d2b..ebbc0139 100644 --- a/xorriso/disk_ops.c +++ b/xorriso/disk_ops.c @@ -568,9 +568,12 @@ ex:; /* @param flag bit1= add '+' to perms + bit2-3: hidden_state : 0=off, 1=iso_rr, 2=joliet= 3=on */ int Xorriso__mode_to_perms(mode_t st_mode, char perms[11], int flag) { + int hidden_state; + strcpy(perms,"--------- "); if(st_mode&S_IRUSR) perms[0]= 'r'; if(st_mode&S_IWUSR) perms[1]= 'w'; @@ -599,8 +602,19 @@ int Xorriso__mode_to_perms(mode_t st_mode, char perms[11], int flag) else perms[8]= 'T'; } - if(flag & 2) - perms[9]= '+'; + hidden_state= (flag >> 2) & 3; + if(hidden_state == 1) + perms[9]= 'I'; + else if(hidden_state == 2) + perms[9]= 'J'; + else if(hidden_state == 3) + perms[9]= 'H'; + if(flag & 2) { + if(hidden_state) + perms[9]= tolower(perms[9]); + else + perms[9]= '+'; + } return(1); } @@ -611,7 +625,7 @@ int Xorriso__mode_to_perms(mode_t st_mode, char perms[11], int flag) */ int Xorriso_format_ls_l(struct XorrisO *xorriso, struct stat *stbuf, int flag) { - int show_major_minor= 0, high_shift= 0, high_mask= 0, hidden_state; + int show_major_minor= 0, high_shift= 0, high_mask= 0; char *rpt, perms[11], mm_text[80]; mode_t st_mode; dev_t dev, major, minor; @@ -623,15 +637,7 @@ int Xorriso_format_ls_l(struct XorrisO *xorriso, struct stat *stbuf, int flag) if(S_ISDIR(st_mode)) strcat(rpt, "d"); else if(S_ISREG(st_mode)) { - hidden_state= (flag >> 2) & 3; - if(hidden_state == 1) - strcat(rpt, "R"); - else if(hidden_state == 2) - strcat(rpt, "J"); - else if(hidden_state == 3) - strcat(rpt, "H"); - else - strcat(rpt, "-"); + strcat(rpt, "-"); } else if(S_ISLNK(st_mode)) strcat(rpt, "l"); else if(S_ISBLK(st_mode)) { @@ -649,7 +655,7 @@ int Xorriso_format_ls_l(struct XorrisO *xorriso, struct stat *stbuf, int flag) else strcat(rpt, "?"); - Xorriso__mode_to_perms(st_mode, perms, flag & 2); + Xorriso__mode_to_perms(st_mode, perms, flag & (2 | 12)); strcat(rpt, perms); sprintf(rpt+strlen(rpt)," %3u ",(unsigned int) stbuf->st_nlink); diff --git a/xorriso/emulators.c b/xorriso/emulators.c index d771bbf1..5cf5e875 100644 --- a/xorriso/emulators.c +++ b/xorriso/emulators.c @@ -509,7 +509,7 @@ int Xorriso_genisofs_ignore(struct XorrisO *xorriso, char *whom, "" }; static char ignored_arg1_options[][41]= { - "-biblio", "-check-session", "-p", "-root", + "-biblio", "-check-session", "-hide-hfs", "-hide-hfs-list", "-p", "-root", "-old-root", "-table-name", "-volset-seqno", "-volset-size", "" }; @@ -566,6 +566,10 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag) " -f, -follow-links Follow symbolic links", " -graft-points Allow to use graft points for filenames", " -help Print option help", +" -hide GLOBFILE Hide ISO9660/RR file", +" -hide-list FILE File with list of ISO9660/RR files to hide", +" -hide-joliet GLOBFILE Hide Joliet file", +" -hide-joliet-list FILE File with list of Joliet files to hide", " -input-charset CHARSET Local input charset for file name conversion", " -output-charset CHARSET Output charset for file name conversion", " -iso-level LEVEL Set ISO9660 conformance level (1..3)", @@ -642,6 +646,86 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag) } +/* Perform hiding. + Cumbersome: The paths and patterns apply to the disk address and not + to the Rock Ridge address. Actually even the literal form of the + mkisofs pathspec would matter (e.g. "./" versus ""). + But xorriso normalizes disk_paths before further processing. Thus + the literal form does not matter. +*/ +int Xorriso_genisofs_hide(struct XorrisO *xorriso, char *whom, + char *pattern, int hide_attrs, int flag) +{ + int zero= 0, ret; + char *argv[1]; + + if((hide_attrs & 3) == 0) + return(2); + if(strchr(pattern, '/') != NULL) { + argv[0]= pattern; + ret= Xorriso_option_not_paths(xorriso, 1, argv, &zero, + 4 | (hide_attrs & 3)); + } else { + ret= Xorriso_option_not_leaf(xorriso, pattern, hide_attrs & 3); + } + return(ret); +} + + +/* @param flag bit0= quoted list */ +int Xorriso_genisofs_hide_list(struct XorrisO *xorriso, char *whom, + char *adr, int hide_attrs, int flag) +{ + int ret, linecount= 0, argc= 0, was_failure= 0, i, fret; + char **argv= NULL; + FILE *fp= NULL; + + if(adr[0]==0) { + sprintf(xorriso->info_text, + "Empty file name given with -as %s -hide-%slist", + whom, hide_attrs == 1 ? "" : "joliet-"); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); + return(0); + } + ret= Xorriso_afile_fopen(xorriso, adr, "rb", &fp, 0); + if(ret <= 0) + return(0); + if(ret <= 0) + return(0); + while(1) { + ret= Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, + 4 | (flag & 1) ); + if(ret <= 0) + goto ex; + if(ret == 2) + break; + for(i= 0; i < argc; i++) { + if(argv[i][0] == 0) + continue; + ret= Xorriso_genisofs_hide(xorriso, whom, argv[i], hide_attrs, 0); + if(ret <= 0 || xorriso->request_to_abort) { + was_failure= 1; + fret= Xorriso_eval_problem_status(xorriso, ret, 1|2); + if(fret>=0) + continue; + if(ret > 0) + ret= 0; + goto ex; + } + } + } + ret= 1; +ex:; + if(flag & 1) + Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, 2); + if(fp != NULL && fp != stdin) + fclose(fp); + if(ret<=0) + return(ret); + return(!was_failure); +} + + /* micro emulation of mkisofs */ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom, int argc, char **argv, int flag) @@ -649,8 +733,9 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom, int ret, i, j, was_path= 0, was_other_option= 0, mem_graft_points, mem; int do_print_size= 0, fd, idx, iso_level= 0, no_emul_boot= 0; int option_b= 0, was_failure= 0, fret, lower_r= 0, zero= 0; + int with_boot_image= 0, with_cat_path= 0; int *weight_list= NULL, weight_count= 0; - int *boot_opt_list= NULL, boot_opt_count= 0; + int *delay_opt_list= NULL, delay_opt_count= 0; char sfe[5*SfileadrL], adr[SfileadrL+8], ra_text[80], pathspec[2*SfileadrL]; char *ept, *add_pt, eff_path[SfileadrL], indev[SfileadrL+8], msc[80], *cpt; char *boot_path; @@ -664,13 +749,15 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom, Xorriso_no_malloc_memory(xorriso, NULL, 0); return(-1); } - boot_opt_list= TSOB_FELD(int, argc + 1); - if(boot_opt_list == NULL) { + delay_opt_list= TSOB_FELD(int, argc + 1); + if(delay_opt_list == NULL) { cpt= (char *) weight_list; Xorriso_no_malloc_memory(xorriso, &cpt, 0); return(-1); } + if(xorriso->boot_image_cat_path[0]) + with_cat_path= -1; adr[0]= indev[0]= msc[0]= 0; for(i= 0; i=argc) + goto not_enough_args; + i++; + if(strcmp(argv[i - 1], "-hide") == 0) + ret= Xorriso_genisofs_hide(xorriso, whom, argv[i], 1, 0); + else if(strcmp(argv[i - 1], "-hide-list") == 0) + ret= Xorriso_genisofs_hide_list(xorriso, whom, argv[i], 1, 0); + else if(strcmp(argv[i - 1], "-hide-joliet") == 0) + ret= Xorriso_genisofs_hide(xorriso, whom, argv[i], 2, 0); + else if(strcmp(argv[i - 1], "-hide-joliet-list") == 0) + ret= Xorriso_genisofs_hide_list(xorriso, whom, argv[i], 2, 0); + if(ret <= 0) + goto problem_handler_1; + } else if(strcmp(argv[i], "--hardlinks")==0) { Xorriso_option_hardlinks(xorriso, "on", 0); } else if(strcmp(argv[i], "--acl")==0) { @@ -993,7 +1099,7 @@ not_enough_args:; strncmp(argv[i], "isolinux_mbr=", 13)==0 || strcmp(argv[i], "-eltorito-alt-boot")==0 || strcmp(argv[i], "--protective-msdos-label")==0) { - boot_opt_list[boot_opt_count++]= i; + delay_opt_list[delay_opt_count++]= i; } else if(strcmp(argv[i], "-b") == 0 || strcmp(argv[i], "-eltorito-boot") == 0 || strcmp(argv[i], "--efi-boot") == 0 || @@ -1006,7 +1112,7 @@ not_enough_args:; strcmp(argv[i], "-isohybrid-mbr")==0) { if(i+1>=argc) goto not_enough_args; - boot_opt_list[boot_opt_count++]= i; + delay_opt_list[delay_opt_count++]= i; i++; } else if(strncmp(argv[i], "--modification-date=", 20)==0) { ret= Xorriso_option_volume_date(xorriso, "uuid", argv[i] + 20, 0); @@ -1054,6 +1160,15 @@ not_enough_args:; Xorriso_relax_compliance(xorriso, "no_force_dots", 0); } else if(strcmp(argv[i], "-allow-lowercase") == 0) { Xorriso_relax_compliance(xorriso, "lowercase", 0); + + } else if(strcmp(argv[i], "-hide") == 0 || + strcmp(argv[i], "-hide-list") == 0 || + strcmp(argv[i], "-hide-joliet") == 0 || + strcmp(argv[i], "-hide-joliet-list") == 0) { + if(i+1>=argc) + goto not_enough_args; + i++; + /* was already handled in first argument scan */; } else if(argv[i][0]=='-' && argv[i][1]!=0) { sprintf(xorriso->info_text, "-as %s: Unknown option %s", whom, Text_shellsafe(argv[i], sfe, 0)); @@ -1132,8 +1247,8 @@ problem_handler_2:; } /* After all pathspecs are added: perform boot related options */ - for(j= 0; j < boot_opt_count; j++) { - i= boot_opt_list[j]; + for(j= 0; j < delay_opt_count; j++) { + i= delay_opt_list[j]; if(strcmp(argv[i], "-no-emul-boot")==0) { no_emul_boot= 1; } else if(strcmp(argv[i], "-boot-info-table")==0) { @@ -1171,6 +1286,7 @@ problem_handler_2:; goto problem_handler_boot; } xorriso->keep_boot_image= 0; + with_boot_image= 1; } else if(strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "-eltorito-catalog") == 0) { if(i+1>=argc) @@ -1183,6 +1299,8 @@ problem_handler_2:; + strlen(xorriso->boot_image_cat_path), argv[i], 0); if(ret <= 0) goto ex; + if(with_cat_path == 0) + with_cat_path= 1; } else if(strcmp(argv[i], "-boot-load-size") == 0) { if(i+1>=argc) goto not_enough_args; @@ -1223,11 +1341,21 @@ problem_handler_boot:; continue; goto ex; } + if(with_boot_image && with_cat_path == 0) + strcpy(xorriso->boot_image_cat_path, "/boot.catalog"); if(xorriso->boot_image_bin_path[0]) { ret= Xorriso_genisofs_add_boot(xorriso, whom, &option_b, &no_emul_boot, 0); if(ret <= 0) goto ex; } + /* The boot catalog has to be hidden separately */ + if(xorriso->boot_image_cat_path[0]) { + ret= Xorriso_path_is_hidden(xorriso, xorriso->boot_image_cat_path, 0); + if(ret > 0) + xorriso->boot_image_cat_hidden|= ret; + else if(ret < 0) + was_failure= 1; + } ret= !was_failure; ex:; @@ -1238,8 +1366,8 @@ ex:; Xorriso_option_rollback(xorriso, 0); if(weight_list != NULL) free(weight_list); - if(boot_opt_list != NULL) - free(boot_opt_list); + if(delay_opt_list != NULL) + free(delay_opt_list); return(ret); } diff --git a/xorriso/misc_funct.c b/xorriso/misc_funct.c index 364f3d5e..a345cf0f 100644 --- a/xorriso/misc_funct.c +++ b/xorriso/misc_funct.c @@ -1193,3 +1193,19 @@ int Xorriso__hide_mode(char *mode, int flag) return(-1); } + +char *Xorriso__hide_mode_text(int hide_mode, int flag) +{ + switch(hide_mode & 3) { + case 0: + return "off"; + case 1: + return "iso_rr"; + case 2: + return "joliet"; + case 3: + return "on"; + } + return "invalid"; +} + diff --git a/xorriso/misc_funct.h b/xorriso/misc_funct.h index 9d5aaffb..78e8b289 100644 --- a/xorriso/misc_funct.h +++ b/xorriso/misc_funct.h @@ -87,5 +87,8 @@ int Xorriso__bourne_to_reg(char bourne_expr[], char reg_expr[], int flag); int Xorriso__hide_mode(char *mode, int flag); +char *Xorriso__hide_mode_text(int hide_mode, int flag); + + #endif /* ! Xorriso_pvt_misc_includeD */ diff --git a/xorriso/opts_i_o.c b/xorriso/opts_i_o.c index 5dd5673d..9ab745c5 100644 --- a/xorriso/opts_i_o.c +++ b/xorriso/opts_i_o.c @@ -811,7 +811,10 @@ int Xorriso_option_no_rc(struct XorrisO *xorriso, int flag) } -/* Option -not_leaf */ +/* Option -not_leaf , (-hide_disk_leaf resp. -as mkisofs -hide) */ +/* @param flag bit0= add to iso_rr_hidings rather than disk_exclusions + bit1= add to joliet_hidings rather than disk_exclusions +*/ int Xorriso_option_not_leaf(struct XorrisO *xorriso, char *pattern, int flag) { regex_t re; @@ -823,10 +826,24 @@ int Xorriso_option_not_leaf(struct XorrisO *xorriso, char *pattern, int flag) Xorriso__bourne_to_reg(pattern, regexpr, 0); if(regcomp(&re, regexpr, 0)!=0) {ret= 0; goto cannot_add;} - ret= Exclusions_add_not_leafs(xorriso->disk_exclusions, pattern, &re, 0); + if(flag & 3) { + if(flag & 1) { + ret= Exclusions_add_not_leafs(xorriso->iso_rr_hidings, pattern, &re, 0); + if(ret<=0) + goto cannot_add; + } + if(flag & 2) { + ret= Exclusions_add_not_leafs(xorriso->joliet_hidings, pattern, &re, 0); + if(ret<=0) + goto cannot_add; + } + } else { + ret= Exclusions_add_not_leafs(xorriso->disk_exclusions, pattern, &re, 0); + } if(ret<=0) { cannot_add:; - sprintf(xorriso->info_text,"Cannot add pattern: -not_leaf %s", + sprintf(xorriso->info_text,"Cannot add pattern: %s %s", + (flag & 3) ? "-hide_disk_leaf" : "-not_leaf", Text_shellsafe(pattern, sfe, 0)); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); return(ret); @@ -945,7 +962,12 @@ int Xorriso_option_not_mgt(struct XorrisO *xorriso, char *setting, int flag) } -/* Option -not_paths */ +/* Option -not_paths , (-hide_disk_paths resp. -as mkisofs -hide) */ +/* @param flag bit0= add to iso_rr_hidings rather than disk_exclusions + bit1= add to joliet_hidings rather than disk_exclusions + bit2= enable disk pattern expansion regardless of -disk_pattern + +*/ int Xorriso_option_not_paths(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag) { @@ -954,7 +976,7 @@ int Xorriso_option_not_paths(struct XorrisO *xorriso, int argc, char **argv, end_idx= Xorriso_end_idx(xorriso, argc, argv, *idx, - (xorriso->do_disk_pattern==1) | 2); + (xorriso->do_disk_pattern == 1 || (flag & 4)) | 2); if(end_idx<=0) return(end_idx); num_descr= end_idx - *idx; @@ -980,17 +1002,41 @@ no_memory:; goto no_memory; } - ret= Xorriso_opt_args(xorriso, "-not_paths", - num_descr, descr, 0, &dummy, &optc, &optv, 2); + ret= Xorriso_opt_args(xorriso, (flag & 3) ? "-hide_disk_paths" : "-not_paths", + num_descr, descr, 0, &dummy, &optc, &optv, + 2 | ((flag & 4) << 7)); if(ret<=0) goto ex; - ret= Exclusions_add_not_paths(xorriso->disk_exclusions, - num_descr, descr, optc, optv, 0); - if(ret<=0) { - sprintf(xorriso->info_text,"Cannot add path list: -not_paths %s%s %s", - Text_shellsafe(argv[*idx], sfe, 0), (num_descr>1 ? " ..." : ""), - xorriso->list_delimiter); - Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); + if(flag & 3) { + if(flag & 1) { + ret= Exclusions_add_not_paths(xorriso->iso_rr_hidings, + num_descr, descr, optc, optv, 0); + if(ret<=0) { +no_hide:; + sprintf(xorriso->info_text, + "Cannot add path list: -hide_disk_paths %s %s%s %s", + Xorriso__hide_mode_text(flag & 3, 0), + Text_shellsafe(argv[*idx], sfe, 0), (num_descr>1 ? " ..." : ""), + xorriso->list_delimiter); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); + goto ex; + } + } + if(flag & 2) { + ret= Exclusions_add_not_paths(xorriso->joliet_hidings, + num_descr, descr, optc, optv, 0); + if(ret<=0) + goto no_hide; + } + } else { + ret= Exclusions_add_not_paths(xorriso->disk_exclusions, + num_descr, descr, optc, optv, 0); + if(ret<=0) { + sprintf(xorriso->info_text,"Cannot add path list: -not_paths %s%s %s", + Text_shellsafe(argv[*idx], sfe, 0), (num_descr>1 ? " ..." : ""), + xorriso->list_delimiter); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); + } } ex:; (*idx)= end_idx; diff --git a/xorriso/parse_exec.c b/xorriso/parse_exec.c index cab047dd..55170d45 100644 --- a/xorriso/parse_exec.c +++ b/xorriso/parse_exec.c @@ -77,6 +77,7 @@ int Xorriso_end_idx(struct XorrisO *xorriso, bit6= with bit5 allow 0 matches if pattern is a constant bit7= silently tolerate empty argument list bit8= free the eventually allocated sub_vector + bit9= always expand wildcards */ int Xorriso_opt_args(struct XorrisO *xorriso, char *cmd, int argc, char **argv, int idx, @@ -87,9 +88,9 @@ int Xorriso_opt_args(struct XorrisO *xorriso, char *cmd, off_t mem= 0; if(flag&2) - do_expand= xorriso->do_disk_pattern==1 && !(flag&4); + do_expand= (xorriso->do_disk_pattern==1 && !(flag&4)) || (flag & 512); else - do_expand= xorriso->do_iso_rr_pattern==1 && !(flag&4); + do_expand= (xorriso->do_iso_rr_pattern==1 && !(flag&4)) || (flag & 512); if(flag&256) { if(*optv=argv+argc) Sfile_destroy_argv(optc, optv, 0); @@ -1879,6 +1880,28 @@ int Xorriso_path_is_excluded(struct XorrisO *xorriso, char *path, int flag) } +int Xorriso_path_is_hidden(struct XorrisO *xorriso, char *path, int flag) +{ + int ret, hide_attrs= 0; + + ret= Exclusions_match(xorriso->iso_rr_hidings, path, 0); + if(ret < 0) { +failure:; + sprintf(xorriso->info_text, "Error during disk file hiding decision"); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0); + return(-1); + } + if(ret > 0) + hide_attrs|= 1; + ret= Exclusions_match(xorriso->joliet_hidings, path, 0); + if(ret < 0) + goto failure; + if(ret > 0) + hide_attrs|= 2; + return(hide_attrs); +} + + /* Normalize ACL and sort apart "access" ACL from "default" ACL. */ int Xorriso_normalize_acl_text(struct XorrisO *xorriso, char *in_text, diff --git a/xorriso/xorriso.1 b/xorriso/xorriso.1 index e0300db3..79da18c2 100644 --- a/xorriso/xorriso.1 +++ b/xorriso/xorriso.1 @@ -1429,6 +1429,9 @@ The eventual data content of such hidden files will be included in the resulting image, even if they do not show up in any directory. But you will need own means to find nameless data in the image. .br +Warning: Data which are hidden from the ISO 9660 tree will not be copied +by the write method of modifying. +.br Possible values of hide_state are: "iso_rr" for hiding from ISO 9660 tree, "joliet" for Joliet tree, "on" for both trees. "off" means visibility in both directory trees. @@ -2702,6 +2705,13 @@ This resembles shell command ls -d. \fB\-lsl\fR iso_rr_pattern [***] Like -ls but also list some of the file attributes. The output format resembles shell command ls -ln. +.br +If the file has non-trivial ACL, then a '+' is appended to the permission info. +If the file is hidden, then 'I' for "iso_rr", 'J' for "joliet", resp. 'H' for +"on" gets appended. Together with ACL it is 'i', 'j', resp. 'h'. +.br +Particular types of regular files: "R" hidden in ISO/Rock Ridge, "J" hidden in +Joliet, "H" hidden in both trees. .TP \fB\-lsdl\fR iso_rr_pattern [***] Like -lsd but also list some of the file attributes. diff --git a/xorriso/xorriso.h b/xorriso/xorriso.h index fb26fa15..52e11520 100644 --- a/xorriso/xorriso.h +++ b/xorriso/xorriso.h @@ -927,7 +927,12 @@ int Xorriso_option_mvi(struct XorrisO *xorriso, int argc, char **argv, /* Option -no_rc */ int Xorriso_option_no_rc(struct XorrisO *xorriso, int flag); -/* Option -not_leaf */ +/* Option -not_leaf , -as mkisofs -hide without '/' */ +/* @param flag bit0= add to iso_rr hide list rather than to disk exclusions + @since 0.6.0 + bit1= add to joliet hide list rather than disk exclusions + @since 0.6.0 +*/ int Xorriso_option_not_leaf(struct XorrisO *xorriso, char *pattern, int flag); /* Option -not_list , -quoted_not_list */ @@ -937,7 +942,13 @@ int Xorriso_option_not_list(struct XorrisO *xorriso, char *adr, int flag); /* Option -not_mgt */ int Xorriso_option_not_mgt(struct XorrisO *xorriso, char *setting, int flag); -/* Option -not_paths */ +/* Option -not_paths , -as mkisofs -hide with '/' */ +/* @param flag bit0= add to iso_rr hide list rather than to disk exclusions + @since 0.6.0 + bit1= add to joliet hide list rather than disk exclusions + @since 0.6.0 + bit2= enable disk pattern expansion regardless of -disk_pattern +*/ int Xorriso_option_not_paths(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag); diff --git a/xorriso/xorriso.info b/xorriso/xorriso.info index d52dfbcf..53f037ff 100644 --- a/xorriso/xorriso.info +++ b/xorriso/xorriso.info @@ -1306,6 +1306,8 @@ whether they stem from the loaded image or were newly inserted. included in the resulting image, even if they do not show up in any directory. But you will need own means to find nameless data in the image. + Warning: Data which are hidden from the ISO 9660 tree will not be + copied by the write method of modifying. Possible values of hide_state are: "iso_rr" for hiding from ISO 9660 tree, "joliet" for Joliet tree, "on" for both trees. "off" means visibility in both directory trees. @@ -2399,6 +2401,12 @@ File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Options -lsl iso_rr_pattern [***] Like -ls but also list some of the file attributes. The output format resembles shell command ls -ln. + If the file has non-trivial ACL, then a '+' is appended to the + permission info. If the file is hidden, then 'I' for "iso_rr", + 'J' for "joliet", resp. 'H' for "on" gets appended. Together with + ACL it is 'i', 'j', resp. 'h'. + Particular types of regular files: "R" hidden in ISO/Rock Ridge, + "J" hidden in Joliet, "H" hidden in both trees. -lsdl iso_rr_pattern [***] Like -lsd but also list some of the file attributes. The output @@ -3699,9 +3707,9 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -close_filter_list bans filter registration: Filter. (line 52) * -commit writes pending ISO image: Writing. (line 13) * -commit_eject writes and ejects: Writing. (line 40) -* -compare reports ISO/disk differences: Navigate. (line 130) -* -compare_l reports ISO/disk differences: Navigate. (line 148) -* -compare_r reports ISO/disk differences: Navigate. (line 143) +* -compare reports ISO/disk differences: Navigate. (line 136) +* -compare_l reports ISO/disk differences: Navigate. (line 154) +* -compare_r reports ISO/disk differences: Navigate. (line 149) * -compliance controls standard compliance: SetWrite. (line 14) * -cp_rx copies file trees to disk: Restore. (line 104) * -cpax copies files to disk: Restore. (line 100) @@ -3714,11 +3722,11 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -disk_dev_ino fast incremental backup: Loading. (line 163) * -disk_pattern controls pattern expansion: Insert. (line 31) * -drive_class controls drive accessability: Loading. (line 35) -* -du show directory size in ISO image: Navigate. (line 84) +* -du show directory size in ISO image: Navigate. (line 90) * -dummy controls write simulation: SetWrite. (line 188) -* -dus show directory size in ISO image: Navigate. (line 88) -* -dusx show directory size on disk: Navigate. (line 97) -* -dux show directory size on disk: Navigate. (line 92) +* -dus show directory size in ISO image: Navigate. (line 94) +* -dusx show directory size on disk: Navigate. (line 103) +* -dux show directory size on disk: Navigate. (line 98) * -dvd_obs set write block size: SetWrite. (line 175) * -eject ejects drive tray: Writing. (line 36) * -end writes pending session and ends program: Scripting. (line 122) @@ -3732,15 +3740,15 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -extract_single copies file to disk: Restore. (line 68) * -file_size_limit limits data file size: SetInsert. (line 7) * -find traverses and alters ISO tree: CmdFind. (line 7) -* -findx traverses disk tree: Navigate. (line 101) +* -findx traverses disk tree: Navigate. (line 107) * -follow softlinks and mount points: SetInsert. (line 76) * -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 158) * -format formats media: Writing. (line 69) * -fs sets size of fifo: SetWrite. (line 192) -* -getfacl shows ACL in ISO image: Navigate. (line 65) -* -getfacl_r shows ACL in ISO image: Navigate. (line 72) -* -getfattr shows xattr in ISO image: Navigate. (line 76) -* -getfattr_r shows xattr in ISO image: Navigate. (line 80) +* -getfacl shows ACL in ISO image: Navigate. (line 71) +* -getfacl_r shows ACL in ISO image: Navigate. (line 78) +* -getfattr shows xattr in ISO image: Navigate. (line 82) +* -getfattr_r shows xattr in ISO image: Navigate. (line 86) * -gid sets global ownership: SetWrite. (line 132) * -grow_blindly overides next writeable address: AqDrive. (line 44) * -hardlinks controls handling of hard links: Loading. (line 91) @@ -3759,12 +3767,12 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -logfile logs output channels to file: Frontend. (line 20) * -ls lists files in ISO image: Navigate. (line 26) * -lsd lists files in ISO image: Navigate. (line 34) -* -lsdl lists files in ISO image: Navigate. (line 42) -* -lsdlx lists files on disk: Navigate. (line 61) -* -lsdx lists files on disk: Navigate. (line 53) +* -lsdl lists files in ISO image: Navigate. (line 48) +* -lsdlx lists files on disk: Navigate. (line 67) +* -lsdx lists files on disk: Navigate. (line 59) * -lsl lists files in ISO image: Navigate. (line 38) -* -lslx lists files on disk: Navigate. (line 57) -* -lsx lists files on disk: Navigate. (line 46) +* -lslx lists files on disk: Navigate. (line 63) +* -lsx lists files on disk: Navigate. (line 52) * -map inserts path: Insert. (line 85) * -map_l inserts paths from disk file: Insert. (line 94) * -map_single inserts path: Insert. (line 90) @@ -3824,8 +3832,8 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -setfattr sets xattr in ISO image: Manip. (line 110) * -setfattr_list sets xattr in ISO image: Manip. (line 126) * -setfattr_r sets xattr in ISO image: Manip. (line 123) -* -show_stream shows data source and filters: Navigate. (line 153) -* -show_stream_r shows data source and filters: Navigate. (line 168) +* -show_stream shows data source and filters: Navigate. (line 159) +* -show_stream_r shows data source and filters: Navigate. (line 174) * -speed set write speed: SetWrite. (line 148) * -split_size enables large file splitting: SetInsert. (line 140) * -status shows current settings: Scripting. (line 25) @@ -3862,8 +3870,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * ACL, set in ISO image, -setfacl: Manip. (line 73) * ACL, set in ISO image, -setfacl_list: Manip. (line 100) * ACL, set in ISO image, -setfacl_r: Manip. (line 97) -* ACL, show in ISO image, -getfacl: Navigate. (line 65) -* ACL, show in ISO image, -getfacl_r: Navigate. (line 72) +* ACL, show in ISO image, -getfacl: Navigate. (line 71) +* ACL, show in ISO image, -getfacl_r: Navigate. (line 78) * Appendable media, _definition: Media. (line 34) * Backslash Interpretation, _definition: Processing. (line 49) * Backup, enable fast incremental, -disk_dev_ino: Loading. (line 163) @@ -3916,8 +3924,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Filter, apply to file, -set_filter: Filter. (line 59) * Filter, ban registration, -close_filter_list: Filter. (line 52) * Filter, register, -external_filter: Filter. (line 20) -* Filter, show chain, -show_stream: Navigate. (line 153) -* Filter, show chains of tree, -show_stream_r: Navigate. (line 168) +* Filter, show chain, -show_stream: Navigate. (line 159) +* Filter, show chains of tree, -show_stream_r: Navigate. (line 174) * Filter, unregister, -unregister_filter: Filter. (line 48) * Filter, zisofs parameters, -zisofs: SetWrite. (line 136) * Group, global in ISO image, -gid: SetWrite. (line 132) @@ -3970,17 +3978,17 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Modifying, _definition: Methods. (line 27) * Multi-session media, _definition: Media. (line 7) * Multi-session, _definition: Model. (line 18) -* Navigate, directory size in ISO image, -du: Navigate. (line 84) -* Navigate, directory size in ISO image, -dus: Navigate. (line 88) -* Navigate, directory size in on disk, -dusx: Navigate. (line 97) -* Navigate, directory size in on disk, -dux: Navigate. (line 92) -* Navigate, list disk files, -lsdlx: Navigate. (line 61) -* Navigate, list disk files, -lsdx: Navigate. (line 53) -* Navigate, list disk files, -lslx: Navigate. (line 57) -* Navigate, list disk files, -lsx: Navigate. (line 46) +* Navigate, directory size in ISO image, -du: Navigate. (line 90) +* Navigate, directory size in ISO image, -dus: Navigate. (line 94) +* Navigate, directory size in on disk, -dusx: Navigate. (line 103) +* Navigate, directory size in on disk, -dux: Navigate. (line 98) +* Navigate, list disk files, -lsdlx: Navigate. (line 67) +* Navigate, list disk files, -lsdx: Navigate. (line 59) +* Navigate, list disk files, -lslx: Navigate. (line 63) +* Navigate, list disk files, -lsx: Navigate. (line 52) * Navigate, list ISO files, -ls: Navigate. (line 26) * Navigate, list ISO files, -lsd: Navigate. (line 34) -* Navigate, list ISO files, -lsdl: Navigate. (line 42) +* Navigate, list ISO files, -lsdl: Navigate. (line 48) * Navigate, list ISO files, -lsl: Navigate. (line 38) * Navigate, set disk working directory, -cdx: Navigate. (line 16) * Navigate, set ISO working directory, -cd: Navigate. (line 7) @@ -4047,12 +4055,12 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Table-of-content, show, -toc: Inquiry. (line 18) * Timestamps, set in ISO image, -alter_date: Manip. (line 146) * Timestamps, set in ISO image, -alter_date_r: Manip. (line 166) -* Tree, disk, traverse, -findx: Navigate. (line 101) +* Tree, disk, traverse, -findx: Navigate. (line 107) * Tree, ISO, traverse and alter, -find: CmdFind. (line 7) * Verify, check blocks, -check_media: Verify. (line 21) -* Verify, compare ISO and disk file, -compare: Navigate. (line 130) -* Verify, compare ISO and disk tree, -compare_r: Navigate. (line 143) -* Verify, compare ISO and disk, -compare_l: Navigate. (line 148) +* Verify, compare ISO and disk file, -compare: Navigate. (line 136) +* Verify, compare ISO and disk tree, -compare_r: Navigate. (line 149) +* Verify, compare ISO and disk, -compare_l: Navigate. (line 154) * Verify, file checksum, -check_md5: Verify. (line 144) * Verify, file tree checksums, -check_md5_r: Verify. (line 160) * Verify, preset -check_media, -check_media_defaults: Verify. (line 40) @@ -4077,8 +4085,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * xattr, set in ISO image, -setfattr: Manip. (line 110) * xattr, set in ISO image, -setfattr_list: Manip. (line 126) * xattr, set in ISO image, -setfattr_r: Manip. (line 123) -* xattr, show in ISO image, -getfattr: Navigate. (line 76) -* xattr, show in ISO image, -getfattr_r: Navigate. (line 80) +* xattr, show in ISO image, -getfattr: Navigate. (line 82) +* xattr, show in ISO image, -getfattr_r: Navigate. (line 86)  @@ -4098,42 +4106,42 @@ Node: Loading27397 Node: Insert39576 Node: SetInsert47933 Node: Manip56500 -Node: CmdFind65064 -Node: Filter75015 -Node: Writing79364 -Node: SetWrite85653 -Node: Bootable95937 -Node: Charset103889 -Node: Exception106643 -Node: DialogCtl111158 -Node: Inquiry113503 -Node: Navigate117643 -Node: Verify124997 -Node: Restore133417 -Node: Emulation140073 -Node: Scripting146946 -Node: Frontend152508 -Node: Examples153709 -Node: ExDevices154878 -Node: ExCreate155512 -Node: ExDialog156786 -Node: ExGrowing158048 -Node: ExModifying158850 -Node: ExBootable159351 -Node: ExCharset159898 -Node: ExPseudo160726 -Node: ExCdrecord161620 -Node: ExMkisofs161935 -Node: ExGrowisofs162938 -Node: ExException164062 -Node: ExTime164516 -Node: ExIncBackup164975 -Node: ExRestore168447 -Node: ExRecovery169416 -Node: Files169982 -Node: Seealso171020 -Node: Legal171544 -Node: CommandIdx172466 -Node: ConceptIdx185840 +Node: CmdFind65181 +Node: Filter75132 +Node: Writing79481 +Node: SetWrite85770 +Node: Bootable96054 +Node: Charset104006 +Node: Exception106760 +Node: DialogCtl111275 +Node: Inquiry113620 +Node: Navigate117760 +Node: Verify125481 +Node: Restore133901 +Node: Emulation140557 +Node: Scripting147430 +Node: Frontend152992 +Node: Examples154193 +Node: ExDevices155362 +Node: ExCreate155996 +Node: ExDialog157270 +Node: ExGrowing158532 +Node: ExModifying159334 +Node: ExBootable159835 +Node: ExCharset160382 +Node: ExPseudo161210 +Node: ExCdrecord162104 +Node: ExMkisofs162419 +Node: ExGrowisofs163422 +Node: ExException164546 +Node: ExTime165000 +Node: ExIncBackup165459 +Node: ExRestore168931 +Node: ExRecovery169900 +Node: Files170466 +Node: Seealso171504 +Node: Legal172028 +Node: CommandIdx172950 +Node: ConceptIdx186324  End Tag Table diff --git a/xorriso/xorriso.texi b/xorriso/xorriso.texi index 44f6ddc3..b9cc7f7c 100644 --- a/xorriso/xorriso.texi +++ b/xorriso/xorriso.texi @@ -44,7 +44,7 @@ @c man .\" First parameter, NAME, should be all caps @c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @c man .\" other parameters are allowed: see man(7), man(1) -@c man .TH XORRISO 1 "Jun 20, 2010" +@c man .TH XORRISO 1 "Jun 23, 2010" @c man .\" Please adjust this date whenever revising the manpage. @c man .\" @c man .\" Some roff macros, for reference: @@ -1765,6 +1765,9 @@ The eventual data content of such hidden files will be included in the resulting image, even if they do not show up in any directory. But you will need own means to find nameless data in the image. @* +Warning: Data which are hidden from the ISO 9660 tree will not be copied +by the write method of modifying. +@* Possible values of hide_state are: "iso_rr" for hiding from ISO 9660 tree, "joliet" for Joliet tree, "on" for both trees. "off" means visibility in both directory trees. @@ -3236,6 +3239,10 @@ This resembles shell command ls -d. Like -ls but also list some of the file attributes. The output format resembles shell command ls -ln. @* +If the file has non-trivial ACL, then a '+' is appended to the permission info. +If the file is hidden, then 'I' for "iso_rr", 'J' for "joliet", resp. 'H' for +"on" gets appended. Together with ACL it is 'i', 'j', resp. 'h'. +@* Particular types of regular files: "R" hidden in ISO/Rock Ridge, "J" hidden in Joliet, "H" hidden in both trees. @c man .TP @@ -3808,7 +3815,8 @@ Personality "@strong{mkisofs}" accepts the options listed with: Among them: -R (always on), -r, -J, -o, -M, -C, -path-list, -m, -exclude-list, -f, -print-size, -pad, -no-pad, -V, -v, -version, -graft-points, -z, -no-emul-boot, -b, -c, -boot-info-table, -boot-load-size, -input-charset, -G, --output-charset, -U, pathspecs as with xorriso -add. +-output-charset, -U, -hide, -hide-joliet, -hide-list, -hide-joliet-list, +file paths and pathspecs. A lot of options are not supported and lead to failure of the mkisofs emulation. Some are ignored, but better do not rely on this tolerance. @* diff --git a/xorriso/xorriso_private.h b/xorriso/xorriso_private.h index 0a67cc11..a14eee1a 100644 --- a/xorriso/xorriso_private.h +++ b/xorriso/xorriso_private.h @@ -380,6 +380,9 @@ struct XorrisO { /* the global context of xorriso */ than to treat them as truely missing on disk */ + struct ExclusionS *iso_rr_hidings; + struct ExclusionS *joliet_hidings; + int use_stdin; /* use raw stdin even if readline support is compiled */ int result_page_length; int result_page_width; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index de70abc7..8693d234 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2010.06.22.132641" +#define Xorriso_timestamP "2010.06.23.134250"