ebfb31dec2
Resolves: #1626818
99 lines
3.9 KiB
Diff
99 lines
3.9 KiB
Diff
From 712a067cd6a9594a9b76b45cd27eaea49cbcfc88 Mon Sep 17 00:00:00 2001
|
|
From: Chris Liddell <chris.liddell@artifex.com>
|
|
Date: Thu, 6 Sep 2018 14:08:41 +0100
|
|
Subject: [PATCH 1/2] Bug 699722: Add the ICCProfilesDir to the PermitReading
|
|
list
|
|
|
|
There was also an issue that the string being returned from the graphics
|
|
library was null terminated, and Postscript strings are not (and Ghostscript
|
|
strings are not necessarily). We leave the null termination in place, but
|
|
reduce the length returned by 1.
|
|
---
|
|
Resource/Init/gs_init.ps | 1 +
|
|
base/gsicc_manage.c | 2 +-
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
|
|
index cac0e37..a378c0c 100644
|
|
--- a/Resource/Init/gs_init.ps
|
|
+++ b/Resource/Init/gs_init.ps
|
|
@@ -2042,6 +2042,7 @@ readonly def
|
|
[ currentsystemparams /GenericResourceDir get] (*) .file_name_separator (*)
|
|
concatstrings concatstrings .generate_dir_list_templates
|
|
} if
|
|
+ currentuserparams /ICCProfilesDir known {currentuserparams /ICCProfilesDir get} if
|
|
]
|
|
/PermitFileWriting [
|
|
currentuserparams /PermitFileWriting get aload pop
|
|
diff --git a/base/gsicc_manage.c b/base/gsicc_manage.c
|
|
index 69f05c4..ff685e7 100644
|
|
--- a/base/gsicc_manage.c
|
|
+++ b/base/gsicc_manage.c
|
|
@@ -2972,7 +2972,7 @@ gs_currenticcdirectory(const gs_gstate * pgs, gs_param_string * pval)
|
|
pval->persistent = true;
|
|
} else {
|
|
pval->data = (const byte *)(lib_ctx->profiledir);
|
|
- pval->size = lib_ctx->profiledir_len;
|
|
+ pval->size = lib_ctx->profiledir_len - 1;
|
|
pval->persistent = false;
|
|
}
|
|
}
|
|
--
|
|
2.14.4
|
|
|
|
|
|
From 314399c34db06c4e75b097a50032f834204bc797 Mon Sep 17 00:00:00 2001
|
|
From: Chris Liddell <chris.liddell@artifex.com>
|
|
Date: Thu, 6 Sep 2018 18:40:05 +0100
|
|
Subject: [PATCH 2/2] Bug 699722 (2): add wildcards to the permissions paths.
|
|
|
|
The temp and ICC profile paths need to finish with wildcards to work correctly.
|
|
---
|
|
Resource/Init/gs_init.ps | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
|
|
index a378c0c..e61e879 100644
|
|
--- a/Resource/Init/gs_init.ps
|
|
+++ b/Resource/Init/gs_init.ps
|
|
@@ -2027,7 +2027,7 @@ readonly def
|
|
<<
|
|
/PermitFileReading [
|
|
currentuserparams /PermitFileReading get aload pop
|
|
- //tempfilepaths aload pop
|
|
+ [//tempfilepaths aload pop] (*) .generate_dir_list_templates
|
|
/FONTPATH .systemvar (*) .generate_dir_list_templates
|
|
% Library files :
|
|
/LIBPATH .systemvar (*) .generate_dir_list_templates
|
|
@@ -2042,15 +2042,15 @@ readonly def
|
|
[ currentsystemparams /GenericResourceDir get] (*) .file_name_separator (*)
|
|
concatstrings concatstrings .generate_dir_list_templates
|
|
} if
|
|
- currentuserparams /ICCProfilesDir known {currentuserparams /ICCProfilesDir get} if
|
|
+ currentuserparams /ICCProfilesDir known {[currentuserparams /ICCProfilesDir get] (*) .generate_dir_list_templates} if
|
|
]
|
|
/PermitFileWriting [
|
|
currentuserparams /PermitFileWriting get aload pop
|
|
- //tempfilepaths aload pop
|
|
+ [//tempfilepaths aload pop] (*) .generate_dir_list_templates
|
|
]
|
|
/PermitFileControl [
|
|
currentuserparams /PermitFileControl get aload pop
|
|
- //tempfilepaths aload pop
|
|
+ [//tempfilepaths aload pop] (*) .generate_dir_list_templates
|
|
]
|
|
/LockFilePermissions //true
|
|
>> setuserparams
|
|
@@ -2133,7 +2133,7 @@ SAFER { .setsafeglobal } if
|
|
/.setshapealpha % transparency-example.ps
|
|
/.endtransparencygroup % transparency-example.ps
|
|
/.setdotlength % Bug687720.ps
|
|
- /.sort /.setdebug /.mementolistnewblocks /getenv
|
|
+ /.sort /.mementolistnewblocks /getenv
|
|
|
|
/.makeoperator /.setCPSImode % gs_cet.ps, this won't work on cluster with -dSAFER
|
|
|
|
--
|
|
2.14.4
|
|
|