public class SamrPipeFile extends IPCPipeFile
Pipe file connected to a remote SAMR DCE/RPC service that can be used to retrieve information about remote users, groups, aliases, and perform id to name mappings.
| Modifier and Type | Field and Description |
|---|---|
static int |
DefaultBufferSize |
| Constructor and Description |
|---|
SamrPipeFile(IPCSession sess,
DCEPacket pkt,
int handle,
String name,
int maxTx,
int maxRx)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearCaches()
Clear the domain SID and policy handle caches.
|
void |
closeHandle(PolicyHandle handle)
Close the remote SAM service
|
void |
ClosePipe()
Close the pipe
|
StringList |
enumerateAliases(String domain)
Enumerate the aliases/local groups in a domain
|
StringList |
enumerateDomains()
Enumerate the domains in the server
|
StringList |
enumerateGroups(String domain)
Enumerate the groups in a domain
|
StringList |
enumerateUsers(String domain)
Enumerate the users in a domain
|
RIDList |
getAliasesForUser(PolicyHandle domHandle,
SID userSID)
Return the list of aliases that the user has membership of
|
RIDList |
getAliasesForUser(String domain,
String userName)
Return the list of aliases that the user has membership of
|
RIDList |
getGroupsForUser(PolicyHandle usrHandle)
Return the list of groups that the user has membership of
|
RIDList |
getGroupsForUser(String domain,
String userName)
Return the list of groups that the user has membership of
|
SID |
lookupDomain(String domain)
Find a domain and return the SID
|
String |
lookupDomainName(SID sid)
Lookup the domain name for the specified security id
|
RIDList |
lookupIds(PolicyHandle domHandle,
int[] ids)
Lookup resource ids within a domain and return the resource names and types
|
RIDList |
lookupIds(PolicyHandle domHandle,
int[] ids,
int count)
Lookup resource ids within a domain and return the resource names and types
|
RIDList |
lookupIds(PolicyHandle domHandle,
RIDList rids)
Lookup resource ids within a domain and fill in the resource names and types.
|
RIDList |
lookupName(PolicyHandle domHandle,
String name)
Lookup an object name within a domain and return the resource ids and types
|
RIDList |
lookupName(SID sid)
Lookup the object name for the specified security id
|
PolicyHandle |
openBuiltinDomain()
Open the built in domain
|
PolicyHandle |
openDomain(SID domainSID)
Open a domain and return the policy handle required to perform other functions on the domain
|
PolicyHandle |
openDomain(String domain)
Open a domain and return the policy handle required to perform other functions on the domain
|
protected SamrPolicyHandle |
openService()
Open the SAM service on the remote server
|
PolicyHandle |
openUser(PolicyHandle domHandle,
int rid)
Open a user and return the policy handle required to perform other functions on the user
|
PolicyHandle |
openUser(PolicyHandle domHandle,
RID rid)
Open a user and return the policy handle required to perform other functions on the user
|
PolicyHandle |
openUser(String domain,
String userName)
Open a user and return the policy handle required to perform other functions on the user
|
UserInfo |
queryUserInformation(PolicyHandle usrHandle,
int infoLevel)
Return information for the specified user
|
checkStatus, doDCERequest, doDCERequest, getBuffer, getCallId, getHandle, getMaximumReceiveSize, getMaximumTransmitSize, getNextCallId, getPacket, getPipeName, getRxBuffer, getSession, isClosed, setMaximumReceiveSize, setMaximumTransmitSize, toStringpublic static final int DefaultBufferSize
public SamrPipeFile(IPCSession sess, DCEPacket pkt, int handle, String name, int maxTx, int maxRx) throws IOException, SMBException, DCEException
sess - SMBIPCSessionpkt - DCEPackethandle - intname - StringmaxTx - intmaxRx - intIOExceptionSMBExceptionDCEExceptionprotected final SamrPolicyHandle openService() throws IOException, SMBException
IOExceptionSMBExceptionpublic final StringList enumerateDomains() throws IOException, SMBException
IOExceptionSMBExceptionpublic final StringList enumerateGroups(String domain) throws IOException, SMBException
IOExceptionSMBExceptionpublic final StringList enumerateUsers(String domain) throws IOException, SMBException
IOExceptionSMBExceptionpublic final StringList enumerateAliases(String domain) throws IOException, SMBException
IOExceptionSMBExceptionpublic final SID lookupDomain(String domain) throws IOException, SMBException
domain - StringIOExceptionSMBExceptionpublic final PolicyHandle openDomain(String domain) throws IOException, SMBException
domain - StringIOExceptionSMBExceptionpublic final PolicyHandle openBuiltinDomain() throws IOException, SMBException
IOExceptionSMBExceptionpublic final PolicyHandle openDomain(SID domainSID) throws IOException, SMBException
domainSID - SIDIOExceptionSMBExceptionpublic final RIDList lookupName(PolicyHandle domHandle, String name) throws IOException, SMBException
domHandle - PolicyHandlename - StringIOExceptionSMBExceptionpublic final RIDList lookupName(SID sid) throws IOException, SMBException
sid - SIDIOExceptionSMBExceptionpublic final String lookupDomainName(SID sid) throws IOException, SMBException
sid - SIDIOExceptionSMBExceptionpublic final RIDList lookupIds(PolicyHandle domHandle, RIDList rids) throws IOException, SMBException
domHandle - PolicyHandlerids - RIDListIOExceptionSMBExceptionpublic final RIDList lookupIds(PolicyHandle domHandle, int[] ids) throws IOException, SMBException
domHandle - PolicyHandleids - int[]IOExceptionSMBExceptionpublic final RIDList lookupIds(PolicyHandle domHandle, int[] ids, int count) throws IOException, SMBException
domHandle - PolicyHandleids - int[]count - intIOExceptionSMBExceptionpublic final PolicyHandle openUser(PolicyHandle domHandle, RID rid) throws IOException, SMBException
domHandle - domHandle PolicyHandlerid - RIDIOExceptionSMBExceptionpublic final PolicyHandle openUser(String domain, String userName) throws IOException, SMBException
domain - StringuserName - StringIOExceptionSMBExceptionpublic final PolicyHandle openUser(PolicyHandle domHandle, int rid) throws IOException, SMBException
domHandle - domHandle PolicyHandlerid - intIOExceptionSMBExceptionpublic final RIDList getGroupsForUser(String domain, String userName) throws IOException, SMBException
domain - StringuserName - StringIOExceptionSMBExceptionpublic final RIDList getGroupsForUser(PolicyHandle usrHandle) throws IOException, SMBException
usrHandle - PolicyHandleIOExceptionSMBExceptionpublic final RIDList getAliasesForUser(String domain, String userName) throws IOException, SMBException
domain - StringuserName - StringIOExceptionSMBExceptionpublic final RIDList getAliasesForUser(PolicyHandle domHandle, SID userSID) throws IOException, SMBException
domHandle - PolicyHandleuserSID - SIDIOExceptionSMBExceptionpublic final UserInfo queryUserInformation(PolicyHandle usrHandle, int infoLevel) throws IOException, SMBException
usrHandle - PolicyHandleinfoLevel - intIOExceptionSMBExceptionpublic final void closeHandle(PolicyHandle handle) throws IOException, SMBException
handle - PolicyHandleIOExceptionSMBExceptionpublic void ClosePipe()
throws IOException,
SMBException
ClosePipe in class IPCPipeFileIOExceptionSMBExceptionpublic final void clearCaches()
throws IOException,
SMBException
IOExceptionSMBExceptionCopyright © 2005–2015 Alfresco Software. All rights reserved.