パッケージ jcifs.smb
クラス SID
- java.lang.Object
-
- jcifs.dcerpc.ndr.NdrObject
-
- jcifs.dcerpc.rpc.sid_t
-
- jcifs.smb.SID
-
- すべての実装されたインタフェース:
SID
public class SID extends rpc.sid_t implements SID
Internal representation of SIDs A Windows SID is a numeric identifier used to represent Windows accounts. SIDs are commonly represented using a textual format such as S-1-5-21-1496946806-2192648263-3843101252-1029 but they may also be resolved to yield the name of the associated Windows account such as Administrators or MYDOM\alice.Consider the following output of examples/SidLookup.java:
toString: S-1-5-21-4133388617-793952518-2001621813-512 toDisplayString: WNET\Domain Admins getType: 2 getTypeText: Domain group getDomainName: WNET getAccountName: Domain Admins
-
-
フィールドの概要
フィールド 修飾子とタイプ フィールド 説明 static SID
CREATOR_OWNER
Well known SID: CREATOR_OWNERstatic SID
EVERYONE
Well known SID: EVERYONEstatic int
SID_FLAG_RESOLVE_SIDS
static SID
SYSTEM
Well known SID: SYSTEM-
クラスから継承されたフィールド jcifs.dcerpc.rpc.sid_t
identifier_authority, revision, sub_authority, sub_authority_count
-
インタフェースから継承されたフィールド jcifs.SID
SID_TYPE_ALIAS, SID_TYPE_DELETED, SID_TYPE_DOM_GRP, SID_TYPE_DOMAIN, SID_TYPE_INVALID, SID_TYPE_UNKNOWN, SID_TYPE_USE_NONE, SID_TYPE_USER, SID_TYPE_WKN_GRP
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 SID(byte[] src, int si)
Construct a SID from it's binary representation.SID(String textual)
Construct a SID from it's textual representation such as S-1-5-21-1496946806-2192648263-3843101252-1029.SID(rpc.sid_t sid, int type, String domainName, String acctName, boolean decrementAuthority)
SID(SID domsid, int rid)
Construct a SID from a domain SID and an RID (relative identifier).SID(SID domsid, SID id)
Construct a relative SID
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 boolean
equals(Object obj)
String
getAccountName()
Return the sAMAccountName of this SID unless it could not be resolved in which case the numeric RID is returned.String
getDomainName()
Return the domain name of this SID unless it could not be resolved in which case the numeric representation is returned.SID
getDomainSid()
SID[]
getGroupMemberSids(String authorityServerName, CIFSContext tc, int flags)
Get members of the group represented by this SID, if it is one.int
getRid()
Get the RID This is the last subauthority identifierint
getType()
Returns the type of this SID indicating the state or type of account.String
getTypeText()
Return text representing the SID type suitable for display to users.int
hashCode()
void
initContext(String server, CIFSContext context)
boolean
isBlank()
boolean
isEmpty()
void
resolve(String authorityServerName, CIFSContext tc)
Manually resolve this SID.byte[]
toByteArray()
static byte[]
toByteArray(rpc.sid_t sid)
Convert a sid_t to byte arrayString
toDisplayString()
Return a String representing this SID ideal for display to users.String
toString()
Return the numeric representation of this sid such as S-1-5-21-1496946806-2192648263-3843101252-1029.<T> T
unwrap(Class<T> t)
-
-
-
コンストラクタの詳細
-
SID
public SID(byte[] src, int si)
Construct a SID from it's binary representation.- パラメータ:
src
-si
-
-
SID
public SID(String textual) throws SmbException
Construct a SID from it's textual representation such as S-1-5-21-1496946806-2192648263-3843101252-1029.- パラメータ:
textual
-- 例外:
SmbException
-
SID
public SID(SID domsid, int rid)
Construct a SID from a domain SID and an RID (relative identifier). For example, a domain SID S-1-5-21-1496946806-2192648263-3843101252 and RID 1029 would yield the SID S-1-5-21-1496946806-2192648263-3843101252-1029.- パラメータ:
domsid
-rid
-
-
-
メソッドの詳細
-
toByteArray
public static byte[] toByteArray(rpc.sid_t sid)
Convert a sid_t to byte array- パラメータ:
sid
-- 戻り値:
- byte encoded form
-
unwrap
public <T> T unwrap(Class<T> t)
- 定義:
unwrap
インタフェース内SID
- 戻り値:
- unwrapped instance
- 関連項目:
SID.unwrap(java.lang.Class)
-
toByteArray
public byte[] toByteArray()
- 戻り値:
- encoded SID
-
isEmpty
public boolean isEmpty()
- 戻り値:
- whether the SID is empty (no sub-authorities)
-
isBlank
public boolean isBlank()
- 戻り値:
- whether the SID is blank (all sub-authorities zero)
-
getDomainSid
public SID getDomainSid()
- 定義:
getDomainSid
インタフェース内SID
- 戻り値:
- domain SID
-
getRid
public int getRid()
Get the RID This is the last subauthority identifier
-
getType
public int getType()
インタフェースからコピーされた説明:SID
Returns the type of this SID indicating the state or type of account.SID types are described in the following table.
Type Name SID_TYPE_USE_NONE 0 SID_TYPE_USER User SID_TYPE_DOM_GRP Domain group SID_TYPE_DOMAIN Domain SID_TYPE_ALIAS Local group SID_TYPE_WKN_GRP Builtin group SID_TYPE_DELETED Deleted SID_TYPE_INVALID Invalid SID_TYPE_UNKNOWN Unknown
-
getTypeText
public String getTypeText()
インタフェースからコピーされた説明:SID
Return text representing the SID type suitable for display to users. Text includes 'User', 'Domain group', 'Local group', etc.- 定義:
getTypeText
インタフェース内SID
- 戻り値:
- textual representation of type
-
getDomainName
public String getDomainName()
インタフェースからコピーされた説明:SID
Return the domain name of this SID unless it could not be resolved in which case the numeric representation is returned.- 定義:
getDomainName
インタフェース内SID
- 戻り値:
- the domain name
-
getAccountName
public String getAccountName()
インタフェースからコピーされた説明:SID
Return the sAMAccountName of this SID unless it could not be resolved in which case the numeric RID is returned. If this SID is a domain SID, this method will return an empty String.- 定義:
getAccountName
インタフェース内SID
- 戻り値:
- the account name
-
toString
public String toString()
Return the numeric representation of this sid such as S-1-5-21-1496946806-2192648263-3843101252-1029.
-
toDisplayString
public String toDisplayString()
インタフェースからコピーされた説明:SID
Return a String representing this SID ideal for display to users. This method should return the same text that the ACL editor in Windows would display.Specifically, if the SID has been resolved and it is not a domain SID or builtin account, the full DOMAIN\name form of the account will be returned (e.g. MYDOM\alice or MYDOM\Domain Users). If the SID has been resolved but it is is a domain SID, only the domain name will be returned (e.g. MYDOM). If the SID has been resolved but it is a builtin account, only the name component will be returned (e.g. SYSTEM). If the sid cannot be resolved the numeric representation from toString() is returned.
- 定義:
toDisplayString
インタフェース内SID
- 戻り値:
- display format, potentially with resolved names
-
resolve
public void resolve(String authorityServerName, CIFSContext tc) throws IOException
Manually resolve this SID. Normally SIDs are automatically resolved. However, if a SID is constructed explicitly using a SID constructor, JCIFS will have no knowledge of the server that created the SID and therefore cannot possibly resolve it automatically. In this case, this method will be necessary.- パラメータ:
authorityServerName
- The FQDN of the server that is an authority for the SID.tc
- Context to use- 例外:
IOException
-
getGroupMemberSids
public SID[] getGroupMemberSids(String authorityServerName, CIFSContext tc, int flags) throws IOException
Get members of the group represented by this SID, if it is one.- パラメータ:
authorityServerName
-tc
-flags
-- 戻り値:
- the members of the group
- 例外:
IOException
-
initContext
public void initContext(String server, CIFSContext context)
- パラメータ:
context
-server
-
-
-