<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    無為

    無為則可為,無為則至深!

      BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
      190 Posts :: 291 Stories :: 258 Comments :: 0 Trackbacks
     RMI Security的一個(gè)說明
      JDK1.2的安全模型比JDK1.1使用的更為成熟。Jdk1.2要求對代碼授于具體
      的操作權(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";
    };

        如果你想通過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. 

    凡是有該標(biāo)志的文章,都是該blog博主Caoer(草兒)原創(chuàng),凡是索引、收藏
    、轉(zhuǎn)載請注明來處和原文作者。非常感謝。

    posted on 2005-12-14 13:10 草兒 閱讀(569) 評論(0)  編輯  收藏 所屬分類: Java編程經(jīng)驗(yàn)談
    主站蜘蛛池模板: 亚州免费一级毛片| 全黄大全大色全免费大片| 8x成人永久免费视频| 亚洲国产精品乱码一区二区| 9久久免费国产精品特黄| 中文字幕在亚洲第一在线| 国产福利电影一区二区三区,免费久久久久久久精 | 狠狠综合亚洲综合亚洲色| 最近最新中文字幕完整版免费高清| 亚洲欧洲久久精品| 国产男女爽爽爽爽爽免费视频| 亚洲福利秒拍一区二区| 精品免费久久久久久久| 亚洲区视频在线观看| 大地资源免费更新在线播放| 亚洲国产成人久久综合| 亚洲国产精品13p| 国产黄在线观看免费观看不卡| 国外亚洲成AV人片在线观看| 日本一区午夜艳熟免费| 久久精品国产亚洲AV麻豆不卡| 一级毛片不卡片免费观看| 亚洲精品动漫在线| 成人最新午夜免费视频| 男女男精品网站免费观看| 亚洲人成人无码网www电影首页 | 91精品国产免费久久国语蜜臀| 亚洲啪啪免费视频| 国产精品免费电影| 中国精品一级毛片免费播放| 无码乱人伦一区二区亚洲一| 曰批视频免费30分钟成人| 亚洲AV无码精品国产成人| 亚洲中文字幕不卡无码| 免费A级毛片无码A∨中文字幕下载| 亚洲1234区乱码| 亚洲国产日韩成人综合天堂| 少妇无码一区二区三区免费| 亚洲国产成人无码AV在线| 亚洲精品卡2卡3卡4卡5卡区| 黄页网站免费观看|