免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
如何寫RMI Policy File

發(fā)信人: Xwang_Wang (清規(guī)戒律求同存異),原信區(qū): ustcbbs
標(biāo)  題: 如何寫RMI Policy File
發(fā)信站: 中國(guó)科大BBS站 (Sat, 13 May 2000 08:44:36),站內(nèi)信件

發(fā)信人: maht (Trill-TimeKiller), 信區(qū): Java       
標(biāo)  題: 如何寫RMI Policy File
發(fā)信站: BBS 水木清華站 (Sat Mar 11 18:20:20 2000)

======================================================================
如何寫RMI Policy File
maht@smth翻譯修改

  RMI Security的一個(gè)說(shuō)明
  JDK1.2的安全模型比JDK1.1使用的更為成熟。Jdk1.2要求對(duì)代碼授于具體
  的操作權(quán)才能被允許執(zhí)行某個(gè)操作。
  在JDK1.2,在class path里面的代碼是被信任的,能執(zhí)行任何操作,下載的代碼被預(yù)裝載
  的安全管理器的規(guī)則所管理。如果運(yùn)行一個(gè)JDK1.2里面的例子,當(dāng)你運(yùn)行你的服務(wù)器和客
  戶端,你需要特別指定一個(gè)policy file。下面是一個(gè)一般的policy file,它允許從任何
  codebase(這個(gè)指代碼的路徑前綴,可以是URL)下載的代碼做兩件事:
  1 連接任何主機(jī)上的一個(gè)非特權(quán)的端口(大于1024的端口),或者接受從這樣的連接;
  2 連接80端口(HTTP port)

grant {
    permission java.net.SocketPermission "*:1024-65535",                
        "connect,accept";
    permission java.net.SocketPermission "*:80", "connect";
};

    如果你想通過(guò)HTTP地址下載代碼有效,你必須使用上面的policy file(或者把這段
    grant加到你的缺省的java policy file里面去)。還有,如你想使用file URL,
    那么你用下面的policy file.

grant {
    permission java.net.SocketPermission "*:1024-65535", "connect,accept";
    permission java.io.FilePermission 
        "c:\\home\\ann\\public_html\\classes\\-", "read";
    permission java.io.FilePermission 
        "c:\\home\\jones\\public_html\\classes\\-", "read";
};

======================================================================
原文:    
    The JDK1.2 security model is more sophisticated than the model used for 
    JDK1.1. JDK1.2 contains enhancements for finer-grained security and requires
 
    code to be granted specific permissions to be allowed to perform certain 
    operations. 
    In JDK1.1, code in the class path is trusted and can perform any operation; 
    downloaded code is governed by the rules of the installed security manager. 
    If you run this example in JDK1.2, you need to specify a policy file when 
    you run your server and client. Here is a general policy file that allows 
    downloaded code, from any codebase, to do two things: 
      connect to or accept connections on unprivileged ports (ports greater than
 
      1024) on any host, and 
      connect to port 80 (the port for HTTP). 
grant {
    permission java.net.SocketPermission "*:1024-65535",                
        "connect,accept";
    permission java.net.SocketPermission "*:80", "connect";
};

    If you make your code available for downloading via HTTP URLs, you should 
    use the policy file above when you run this example. However, if you use 
    file URLs instead, you can use the policy file below. Note that in 
    Windows-style file names, the backslash character needs to be represented by
 
    two backslash characters in the policy file. 
grant {
    permission java.net.SocketPermission "*:1024-65535",                
        "connect,accept";
    permission java.io.FilePermission 
        "c:\\home\\ann\\public_html\\classes\\-", "read";
    permission java.io.FilePermission 
        "c:\\home\\jones\\public_html\\classes\\-", "read";
};

    This example assumes that the policy file is called java.policy and contains
 
    the appropriate permissions. If you run this example on JDK1.1, you will not
 
    need to use a policy file, since the RMISecurityManager provides all the 
    protection you need. 

--
什么時(shí)候發(fā)了,要把微軟給買了,不過(guò)沒想好有什么用,
或許給解散了,為人類作點(diǎn)貢獻(xiàn)。

※ 來(lái)源:·BBS 水木清華站 smth.org·[FROM: 166.111.25.111]

※ 來(lái)源: 中國(guó)科大BBS站 [bbs.ustc.edu.cn]

[返回上一頁(yè)] [本討論區(qū)]
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
visualVM進(jìn)行jvm監(jiān)控
JDK Development Tools
用Java實(shí)現(xiàn)FTP批量大文件上傳下載(四)
出現(xiàn)Bad version number in .class file這個(gè)問(wèn)題時(shí),要注意三...
Java 發(fā)展簡(jiǎn)史
Illegal key size 解決方案.note
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服