[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1692-gadc3adf
[email protected] (Ray Johnston) Fri, 20 Sep 2019 19:43:08 +0000 (UTC)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
The ghostpdl branch, master has been updated
via adc3adfdf30f625444203a7c624c3fa123cfddd2 (commit)
via 829bfe72c69091da7f0d7c1243a7647114619070 (commit)
from baad48ab4b35dc9edf0317a1773d9efc7631f2d7 (commit)
----------------------------------------------------------------------
commit adc3adfdf30f625444203a7c624c3fa123cfddd2
Author: Ray Johnston <[email protected]>
Date: Fri Sep 20 12:38:02 2019 -0700
Slight improvement to "permit-file-***" parameter documentation.
diff --git a/doc/Use.htm b/doc/Use.htm
index 5cccef7..943a134 100644
--- a/doc/Use.htm
+++ b/doc/Use.htm
@@ -3524,25 +3524,25 @@ in that it now supports (although does not enforce) case sensitivity.
Four command line parameters permit explicit control of the paths included in
the access control lists:
<ul>
-<li><dt><code>--permit-file-read<code></dt>
+<li><dt><code>--permit-file-read=<code><em>pathlist</em></dt>
<p> Adds a path, or list of paths, to the "permit read" list. A list
of paths is a series of paths separated by the appropriate path list separator
for your platform (for example, on Unix-like systems it is ":"
and on MS Windows it is ";").
</li>
-<li><dt><code>--permit-file-write<code></dt>
+<li><dt><code>--permit-file-write=<code><em>pathlist</em></dt>
<p> Adds a path, or list of paths, to the "permit write" list. A list
of paths is a series of paths separated by the appropriate path list separator
for your platform (for example, on Unix-like systems it is ":"
and on MS Windows it is ";").
</li>
-<li><dt><code>--permit-file-control<code></dt>
+<li><dt><code>--permit-file-control=<code><em>pathlist</em></dt>
<p> Adds a path, or list of paths, to the "permit control" list. A list
of paths is a series of paths separated by the appropriate path list separator
for your platform (for example, on Unix-like systems it is ":"
and on MS Windows it is ";").
</li>
-<li><dt><code>--permit-file-all<code></dt>
+<li><dt><code>--permit-file-all=<code><em>pathlist</em></dt>
<p> Adds a path, or list of paths, to the all the above lists. A list
of paths is a series of paths separated by the appropriate path list separator
for your platform (for example, on Unix-like systems it is ":"
----------------------------------------------------------------------
commit 829bfe72c69091da7f0d7c1243a7647114619070
Author: Ray Johnston <[email protected]>
Date: Fri Sep 20 11:17:53 2019 -0700
Fix tiffsep and tiffsep1 with new file access control and SAFER mode
The tiffsep and tiffsep1 synthesize output file names with the outputfile
and the separation color name, but the 'open' of these filenames would
fail since they were not included on the permit_file_writing list.
Add the full filename before opening, and remove the names after closing.
diff --git a/devices/gdevtsep.c b/devices/gdevtsep.c
index d40f074..ec01fb3 100644
--- a/devices/gdevtsep.c
+++ b/devices/gdevtsep.c
@@ -1360,6 +1360,8 @@ tiffsep1_prn_close(gx_device * pdev)
goto done;
}
code = gx_device_close_output_file(pdev, name, tfdev->sep_file[comp_num]);
+ if (code >= 0)
+ code = gs_remove_control_path(pdev->memory, gs_permit_file_writing, name);
if (code < 0) {
goto done;
}
@@ -1868,6 +1870,8 @@ tiffsep_prn_close(gx_device * pdev)
goto done;
}
code = tiffsep_close_sep_file(pdevn, name, comp_num);
+ if (code >= 0)
+ code = gs_remove_control_path(pdevn->memory, gs_permit_file_writing, name);
if (code < 0) {
goto done;
}
@@ -2402,11 +2406,17 @@ tiffsep_print_page(gx_device_printer * pdev, gp_file * file)
*/
if (tfdev->sep_file[comp_num] != NULL && fmt != NULL) {
code = tiffsep_close_sep_file(tfdev, name, comp_num);
+ if (code >= 0)
+ code = gs_remove_control_path(tfdev->memory, gs_permit_file_writing, name);
if (code < 0)
return code;
}
/* Open the separation file, if not already open */
if (tfdev->sep_file[comp_num] == NULL) {
+ code = gs_add_control_path(tfdev->memory, gs_permit_file_writing, name);
+ if (code < 0) {
+ goto done;
+ }
code = gx_device_open_output_file((gx_device *)pdev, name,
true, true, &(tfdev->sep_file[comp_num]));
if (code < 0) {
@@ -2626,6 +2636,8 @@ cleanup:
continue;
}
code = tiffsep_close_sep_file(tfdev, name, comp_num);
+ if (code >= 0)
+ code = gs_remove_control_path(tfdev->memory, gs_permit_file_writing, name);
if (code < 0) {
code1 = code;
}
@@ -2738,6 +2750,10 @@ tiffsep1_print_page(gx_device_printer * pdev, gp_file * file)
/* Open the separation file, if not already open */
if (tfdev->sep_file[comp_num] == NULL) {
+ code = gs_add_control_path(tfdev->memory, gs_permit_file_writing, name);
+ if (code < 0) {
+ goto done;
+ }
code = gx_device_open_output_file((gx_device *)pdev, name,
true, true, &(tfdev->sep_file[comp_num]));
if (code < 0) {
@@ -2896,6 +2912,8 @@ tiffsep1_print_page(gx_device_printer * pdev, gp_file * file)
continue;
}
code = tiffsep_close_sep_file((tiffsep_device *)tfdev, name, comp_num);
+ if (code >= 0)
+ code = gs_remove_control_path(tfdev->memory, gs_permit_file_writing, name);
if (code < 0) {
code1 = code;
}
Summary of changes:
devices/gdevtsep.c | 18 ++++++++++++++++++
doc/Use.htm | 8 ++++----
2 files changed, 22 insertions(+), 4 deletions(-)