亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ace.java

?? 實現網上鄰居需要的jar庫;可以使用庫中的接口實現文件共享的功能
?? JAVA
字號:
package jcifs.smb;

import jcifs.util.Hexdump;
import java.io.IOException;

/**
 * An Access Control Entry (ACE) is an element in a security descriptor
 * such as those associated with files and directories. The Windows OS
 * determines which users have the necessary permissions to access objects
 * based on these entries.
 * <p>
 * To fully understand the information exposed by this class a description
 * of the access check algorithm used by Windows is required. The following
 * is a basic description of the algorithm. For a more complete description
 * we recommend reading the section on Access Control in Keith Brown's
 * "The .NET Developer's Guide to Windows Security" (which is also
 * available online).
 * <p>
 * Direct ACEs are evaluated first in order. The SID of the user performing
 * the operation and the desired access bits are compared to the SID
 * and access mask of each ACE. If the SID matches, the allow/deny flags
 * and access mask are considered. If the ACE is a "deny"
 * ACE and <i>any</i> of the desired access bits match bits in the access
 * mask of the ACE, the whole access check fails. If the ACE is an "allow"
 * ACE and <i>all</i> of the bits in the desired access bits match bits in
 * the access mask of the ACE, the access check is successful. Otherwise,
 * more ACEs are evaluated until all desired access bits (combined)
 * are "allowed". If all of the desired access bits are not "allowed"
 * the then same process is repeated for inherited ACEs.
 * <p>
 * For example, if user <tt>WNET\alice</tt> tries to open a file
 * with desired access bits <tt>0x00000003</tt> (<tt>FILE_READ_DATA |
 * FILE_WRITE_DATA</tt>) and the target file has the following security
 * descriptor ACEs:
 * <pre>
 * Allow WNET\alice     0x001200A9  Direct
 * Allow Administrators 0x001F01FF  Inherited
 * Allow SYSTEM         0x001F01FF  Inherited
 * </pre>
 * the access check would fail because the direct ACE has an access mask
 * of <tt>0x001200A9</tt> which doesn't have the
 * <tt>FILE_WRITE_DATA</tt> bit on (bit <tt>0x00000002</tt>). Actually, this isn't quite correct. If
 * <tt>WNET\alice</tt> is in the local <tt>Administrators</tt> group the access check
 * will succeed because the inherited ACE allows local <tt>Administrators</tt>
 * both <tt>FILE_READ_DATA</tt> and <tt>FILE_WRITE_DATA</tt> access.
 */

public class ACE {

    public static final int FILE_READ_DATA        = 0x00000001; // 1
    public static final int FILE_WRITE_DATA       = 0x00000002; // 2
    public static final int FILE_APPEND_DATA      = 0x00000004; // 3
    public static final int FILE_READ_EA          = 0x00000008; // 4
    public static final int FILE_WRITE_EA         = 0x00000010; // 5
    public static final int FILE_EXECUTE          = 0x00000020; // 6
    public static final int FILE_DELETE           = 0x00000040; // 7
    public static final int FILE_READ_ATTRIBUTES  = 0x00000080; // 8
    public static final int FILE_WRITE_ATTRIBUTES = 0x00000100; // 9
    public static final int DELETE                = 0x00010000; // 16
    public static final int READ_CONTROL          = 0x00020000; // 17
    public static final int WRITE_DAC             = 0x00040000; // 18
    public static final int WRITE_OWNER           = 0x00080000; // 19
    public static final int SYNCHRONIZE           = 0x00100000; // 20
    public static final int GENERIC_ALL           = 0x10000000; // 28
    public static final int GENERIC_EXECUTE       = 0x20000000; // 29
    public static final int GENERIC_WRITE         = 0x40000000; // 30
    public static final int GENERIC_READ          = 0x80000000; // 31

    public static final int FLAGS_OBJECT_INHERIT    = 0x01;
    public static final int FLAGS_CONTAINER_INHERIT = 0x02;
    public static final int FLAGS_NO_PROPAGATE      = 0x04;
    public static final int FLAGS_INHERIT_ONLY      = 0x08;
    public static final int FLAGS_INHERITED         = 0x10;

    boolean allow;
    int flags;
    int access;
    SID sid;

    /**
     * Returns true if this ACE is an allow ACE and false if it is a deny ACE.
     */
    public boolean isAllow() {
        return allow;
    }
    /**
     * Returns true if this ACE is an inherited ACE and false if it is a direct ACE.
     * <p>
     * Note: For reasons not fully understood, <tt>FLAGS_INHERITED</tt> may
     * not be set within all security descriptors even though the ACE was in
     * face inherited. If an inherited ACE is added to a parent the Windows
     * ACL editor will rebuild all children ACEs and set this flag accordingly.
     */
    public boolean isInherited() {
        return (flags & FLAGS_INHERITED) != 0;
    }
    /**
     * Returns the flags for this ACE. The </tt>isInherited()</tt>
     * method checks the <tt>FLAGS_INHERITED</tt> bit in these flags.
     */
    public int getFlags() {
        return flags;
    }
    /**
     * Returns the 'Apply To' text for inheritance of ACEs on
     * directories such as 'This folder, subfolder and files'. For
     * files the text is always 'This object only'.
     */
    public String getApplyToText() {
        switch (flags & (FLAGS_OBJECT_INHERIT | FLAGS_CONTAINER_INHERIT | FLAGS_INHERIT_ONLY)) {
            case 0x00:
                return "This folder only";
            case 0x03:
                return "This folder, subfolders and files";
            case 0x0B:
                return "Subfolders and files only";
            case 0x02:
                return "This folder and subfolders";
            case 0x0A:
                return "Subfolders only";
            case 0x01:
                return "This folder and files";
            case 0x09:
                return "Files only";
        }
        return "Invalid";
    }
    /**
     * Returns the access mask accociated with this ACE. Use the
     * constants for <tt>FILE_READ_DATA</tt>, <tt>FILE_WRITE_DATA</tt>,
     * <tt>READ_CONTROL</tt>, <tt>GENERIC_ALL</tt>, etc with bitwise
     * operators to determine which bits of the mask are on or off.
     */
    public int getAccessMask() {
        return access;
    }

    /**
     * Return the SID associated with this ACE.
     */
    public SID getSID() {
        return sid;
    }

    int decode( byte[] buf, int bi ) {
        allow = buf[bi++] == (byte)0x00;
        flags = buf[bi++] & 0xFF;
        int size = ServerMessageBlock.readInt2(buf, bi);
        bi += 2;
        access = ServerMessageBlock.readInt4(buf, bi);
        bi += 4;
        sid = new SID(buf, bi);
        return size;
    }

    void appendCol(StringBuffer sb, String str, int width) {
        sb.append(str);
        int count = width - str.length();
        for (int i = 0; i < count; i++) {
            sb.append(' ');
        }
    }
    /**
     * Return a string represeting this ACE.
     * <p>
     * Note: This function should probably be changed to return SDDL
     * fragments but currently it does not.
     */
    public String toString() {
        int count, i;
        String str;

        StringBuffer sb = new StringBuffer();
        sb.append( isAllow() ? "Allow " : "Deny  " );
        appendCol(sb, sid.toDisplayString(), 25);
        sb.append( " 0x" ).append( Hexdump.toHexString( access, 8 )).append(' ');
        sb.append(isInherited() ? "Inherited " : "Direct    ");
        appendCol(sb, getApplyToText(), 34);
        return sb.toString();
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频一区二区在线观看| 亚洲一区二区三区视频在线播放 | 久久综合国产精品| 波多野结衣亚洲| 麻豆成人av在线| 亚洲另类一区二区| 国产亚洲福利社区一区| 欧美日韩不卡在线| 北条麻妃一区二区三区| 天天免费综合色| 亚洲影视在线播放| 亚洲欧美综合网| 久久久夜色精品亚洲| 欧美肥妇毛茸茸| 欧美性受xxxx黑人xyx| 成人一区二区在线观看| 久草热8精品视频在线观看| 蜜乳av一区二区三区| 国产精品天干天干在线综合| 日韩一级片在线观看| 欧美乱熟臀69xxxxxx| 欧美视频在线不卡| 欧美精品一卡两卡| 91精品国产麻豆国产自产在线| 色婷婷久久久综合中文字幕| 99re免费视频精品全部| 91麻豆免费观看| 色综合天天综合给合国产| 91麻豆6部合集magnet| 在线免费精品视频| 91精品国产色综合久久不卡电影| 欧美区一区二区三区| 欧美日韩成人在线| 久久综合五月天婷婷伊人| 国产亚洲精品超碰| 亚洲天堂a在线| 亚洲国产cao| 国产麻豆精品95视频| 色狠狠桃花综合| 日韩一二在线观看| 亚洲国产精品av| 亚洲一区二区三区在线| 久久精品国内一区二区三区| 国产成人午夜片在线观看高清观看| 国产69精品一区二区亚洲孕妇| av激情成人网| 日韩精品一区在线| 亚洲欧美激情视频在线观看一区二区三区| 一区二区三区加勒比av| 久久99精品国产麻豆不卡| 不卡在线视频中文字幕| 7777精品伊人久久久大香线蕉 | 国产精品久久久久三级| 蜜臀99久久精品久久久久久软件| 成人精品鲁一区一区二区| 欧美一区二区三区在线电影| 国产精品白丝在线| 国产精品一二二区| 欧美片网站yy| 欧美精品一级二级三级| 成人性视频免费网站| 欧美日韩成人在线一区| 亚洲免费观看高清完整版在线观看熊 | 亚洲精品欧美在线| 国产乱子伦一区二区三区国色天香| 91视频一区二区三区| 欧美激情一区二区三区不卡| 蜜桃视频一区二区三区在线观看| 色综合久久中文综合久久97| 久久久精品日韩欧美| 秋霞影院一区二区| 91.com在线观看| 日本在线播放一区二区三区| 在线观看av不卡| 一区二区不卡在线播放| 99精品视频免费在线观看| 国产精品色哟哟网站| 一本一道波多野结衣一区二区| 国产欧美日韩另类视频免费观看 | 精品在线亚洲视频| 26uuu国产电影一区二区| 激情深爱一区二区| 久久久精品日韩欧美| 国产91精品一区二区麻豆亚洲| 中文一区二区完整视频在线观看| 国产**成人网毛片九色| 亚洲色图清纯唯美| 欧美日韩和欧美的一区二区| 美国十次综合导航| 国产精品免费视频观看| 91福利视频在线| 韩国av一区二区| 中文字幕中文字幕一区| 91.xcao| 国产91对白在线观看九色| 亚洲一二三四久久| 久久久精品免费网站| 91啦中文在线观看| 国产一区二区三区免费在线观看| 国产精品萝li| 日韩美一区二区三区| 色噜噜久久综合| 国产在线视频一区二区三区| 亚洲欧美国产高清| 久久精子c满五个校花| 在线欧美日韩国产| 成人av网站在线观看免费| 蜜臀av性久久久久av蜜臀妖精| 亚洲精品精品亚洲| 国产亚洲欧美激情| 日韩欧美精品在线视频| 欧美日韩国产精选| 99久久精品费精品国产一区二区| 经典三级视频一区| 日本伊人色综合网| 午夜国产精品一区| 综合久久一区二区三区| 欧美国产日本视频| 久久久亚洲欧洲日产国码αv| 欧美一激情一区二区三区| 色成年激情久久综合| 91免费观看视频在线| 国产不卡视频一区| 99久久精品国产麻豆演员表| 国产高清成人在线| 日本不卡一区二区三区高清视频| 97久久久精品综合88久久| 久久99热99| 国产一区二区三区最好精华液| 日本成人在线电影网| 午夜精品福利久久久| 视频一区二区欧美| 久久国产精品第一页| 国产一区久久久| 国产成人综合在线| 色综合亚洲欧洲| 欧美日韩国产123区| 777奇米四色成人影色区| 日韩亚洲电影在线| 国产欧美精品一区aⅴ影院| 国产欧美一二三区| 一区二区三区四区在线| 调教+趴+乳夹+国产+精品| 狠狠狠色丁香婷婷综合久久五月| 国产又粗又猛又爽又黄91精品| 国产成人av影院| 在线精品视频一区二区| 日韩欧美国产一区二区三区| 久久色在线视频| 亚洲bt欧美bt精品777| 久久66热re国产| 欧美午夜精品免费| 日本一区二区三级电影在线观看 | 日韩午夜在线观看| 欧美激情在线看| 奇米影视在线99精品| 不卡免费追剧大全电视剧网站| 欧美精品色综合| 中文字幕一区二区三区在线播放| 日韩主播视频在线| 一本到不卡精品视频在线观看| 欧美精品一区二区三区一线天视频| 一区二区欧美视频| 成人一级片在线观看| 日韩欧美一区二区三区在线| 亚洲日穴在线视频| 国产不卡在线播放| 久久奇米777| 久久66热偷产精品| 精品少妇一区二区三区日产乱码 | 国产精品一区二区果冻传媒| 欧美三级日韩在线| 亚洲韩国一区二区三区| 91在线播放网址| 中文字幕一区二区在线观看| 国产麻豆精品一区二区| 精品国产99国产精品| 美女一区二区三区在线观看| 欧美一区日本一区韩国一区| 一区二区不卡在线视频 午夜欧美不卡在 | √…a在线天堂一区| 国产成人免费视频精品含羞草妖精 | 国产精品一区二区无线| 亚洲国产精华液网站w| 老司机免费视频一区二区三区| 欧洲一区二区av| 天天综合日日夜夜精品| 欧美精品一卡二卡| 国产在线乱码一区二区三区| 亚洲国产精品v| 欧美午夜一区二区| 久久99精品国产91久久来源| 国产午夜久久久久| 99国产精品久久| 日韩制服丝袜av| 欧美精品一区二区三区四区| 亚洲成人免费视| 欧美日韩在线播| 国产一二三精品| 一区二区三区高清不卡|