[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[plamo:31943] Re: gvで/invalidfileaccess エラー



高田です

回答ありがとうございます。

On 2015年10月06日 17:34, KOJIMA Mitsuhiro wrote:
こじま@遅レス失礼,です.

# 週末は地区の秋祭りで,1tを越える太鼓屋台を押したり担いだりして,まだ全身筋肉痛状態..(^^;

From: 高田稔 <minorut@xxxxxxxxxxx>
Subject: [plamo:31939] gvで/invalidfileaccess エラー
Date: Sat, 03 Oct 2015 14:09:35 +0900

Plamo5.3.1で久しぶりに、gvを実行すると
次のようなエラーがでました。
調べてみると、gsに-dSAFERを付けると
発生するようです。
-dNOSAFERを付けるしか回避方法はないのでしょうか?
情報が足りなければ、指示してください。
このあたり,表示しようとしているPSファイルの構造にも依存するの
で,-dNOSAFERを付けて回避できるなら,それで良しとすべきな気はします.

わかりました。aliasで対応します。
次のような手順で再現します。
gs -dSAFER
GS>/Ryumin-Light-EUC-H findfont
Error: /invalidfileaccess in /findfont
Operand stack:
   Ryumin-Light-EUC-H
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- %loop_continue --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 1919 1 3 %oparray_pop
Dictionary stack:
   --dict:1178/1684(ro)(G)--   --dict:0/20(G)--   --dict:79/200(L)--
Current allocation mode is local
Current file position is 29

-dSAFERがないと次のようになります。
gs
GS>/Ryumin-Light-EUC-H findfont
Loading a TT font from /usr/share/fonts/TrueType/ipam.ttf to emulate a CID font Ryumin-Light ... Done.


あるいはgsとは異なる実装のlibspectreをPSのバックエンドにしている
evinceやatril(GNOME/Mate),okular(KDE)を試してみるぐらいかなぁ.

Error: /invalidfileaccess in /findfont
Operand stack:
    Ryumin-Light-EUC-H
Execution stack:
    %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval--
    %2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false
    %1 %stopped_push 1967 1 3 %oparray_pop 1966 1 3 %oparray_pop 1950 1 3
    %%oparray_pop 1836 1 3 %oparray_pop --nostringval-- %errorexec_pop
    %.runexec2 --nostringval-- --nostringval-- --nostringval-- 2
    %%stopped_push --nostringval-- 1919 1 3 %oparray_pop
Dictionary stack:
    --dict:1182/1684(ro)(G)--   --dict:0/20(G)-- --dict:108/200(L)--
Current allocation mode is local
Current file position is 2311
GPL Ghostscript 9.15: Unrecoverable error, exit code 1
man gs すると SAFER MODE のセクションに,

       The -dSAFER option disables the "deletefile" and "renamefile" operators and prohibits  opening  piped  commands
        ("%pipe%cmd").  Only  "%stdout"  and  "%stderr" can be opened for writing. It also disables reading from files,
        except for "%stdin", files given as a command line argument, and files contained in paths given by LIBPATH  and
        FONTPATH or specified by the system params /FontResourceDir and /GenericResourceDir.

        This  mode  also  sets the .LockSafetyParams parameter of the initial output device to protect against programs
        that attempt to write to files using the OutputFile device parameter. Since the device parameters specified  on
        the  command  line, including OutputFile, are set prior to SAFER mode, use of "-sOutputFile=..." on the command
        line is unrestricted.

        SAFER mode prevents changing the /GenericResourceDir, /FontResourceDir, /SystemParamsPassword,  and  /StartJob-
        Password.

とか書いてあるので,/FontResourceDirあたりの設定を調整すれば何とかなる
かも知れないけれど..

--------
こじま





Follow-Ups
[plamo:31944] Re: gvで/invalidfileaccess エラー, 高田稔
References
[plamo:31939] gvで/invalidfileaccess エラー, 高田稔
[plamo:31941] Re: gvで/invalidfileaccess エラー, KOJIMA Mitsuhiro

[検索ページ] [メール一覧]
Plamo ML 公開システム