歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux編程 >> PERL編程

Perl/Tk FAQ - 18.2. 是否有send函數?是否需要使用xauth?

  原文: 18.2. Is there a send and do I need xauth? There is a Tk::send, but to use it own must write one's own version of Tk::receive. An example of this may be found in the rmt program distributed with perl/Tk. Note that as of Tk-b12 (including the released version Tk400.200) the script that receives from a Tk::send must run with taint chcecking turned on (i.e. with the -T switch thrown) and it must untaint all commands received from the other process. The Tk::send <-> Tk::receive process will work under xhost + authority. The security this affords comes from the fact that anyone who would want to eXPloit it would have to know how to write a Tk::receive custom tailored to your application (in addition to all the other protocol hacking). Please note that while you may not need xauth authorization it is nevertheless always a good idea. 譯文: 18.2. 是否有send函數?是否需要使用xauth? 是的,Perl/Tk本身有一個Tk::send函數,但是要使用它,用戶必須自己寫一個Tk::receive函數。隨Perl/Tk包一起發布的rmt 程序中有一個例子(譯者注:現在的版本中好像沒有了……)。注意,腳本中接收來自Tk:send的信息的腳本必須打開污染檢查的開關(也就是使用-T開關),而且不能污染所有來自其它進程的命令。 Tk::send和Tk::receive進程間通訊需要打開xhost權限。要進行開發的人必須知道如何寫一個適合自己的應用程序的Tk::receive函數,並且要保證安全性。 注意,也許你可以不用xauth的權限,但是打開它是一個好主意。(譯者注:這裡都是針對Unix/Linux系統而言的。)




Copyright © Linux教程網 All Rights Reserved