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, toString
public 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
- intIOException
SMBException
DCEException
protected final SamrPolicyHandle openService() throws IOException, SMBException
IOException
SMBException
public final StringList enumerateDomains() throws IOException, SMBException
IOException
SMBException
public final StringList enumerateGroups(String domain) throws IOException, SMBException
IOException
SMBException
public final StringList enumerateUsers(String domain) throws IOException, SMBException
IOException
SMBException
public final StringList enumerateAliases(String domain) throws IOException, SMBException
IOException
SMBException
public final SID lookupDomain(String domain) throws IOException, SMBException
domain
- StringIOException
SMBException
public final PolicyHandle openDomain(String domain) throws IOException, SMBException
domain
- StringIOException
SMBException
public final PolicyHandle openBuiltinDomain() throws IOException, SMBException
IOException
SMBException
public final PolicyHandle openDomain(SID domainSID) throws IOException, SMBException
domainSID
- SIDIOException
SMBException
public final RIDList lookupName(PolicyHandle domHandle, String name) throws IOException, SMBException
domHandle
- PolicyHandlename
- StringIOException
SMBException
public final RIDList lookupName(SID sid) throws IOException, SMBException
sid
- SIDIOException
SMBException
public final String lookupDomainName(SID sid) throws IOException, SMBException
sid
- SIDIOException
SMBException
public final RIDList lookupIds(PolicyHandle domHandle, RIDList rids) throws IOException, SMBException
domHandle
- PolicyHandlerids
- RIDListIOException
SMBException
public final RIDList lookupIds(PolicyHandle domHandle, int[] ids) throws IOException, SMBException
domHandle
- PolicyHandleids
- int[]IOException
SMBException
public final RIDList lookupIds(PolicyHandle domHandle, int[] ids, int count) throws IOException, SMBException
domHandle
- PolicyHandleids
- int[]count
- intIOException
SMBException
public final PolicyHandle openUser(PolicyHandle domHandle, RID rid) throws IOException, SMBException
domHandle
- domHandle PolicyHandlerid
- RIDIOException
SMBException
public final PolicyHandle openUser(String domain, String userName) throws IOException, SMBException
domain
- StringuserName
- StringIOException
SMBException
public final PolicyHandle openUser(PolicyHandle domHandle, int rid) throws IOException, SMBException
domHandle
- domHandle PolicyHandlerid
- intIOException
SMBException
public final RIDList getGroupsForUser(String domain, String userName) throws IOException, SMBException
domain
- StringuserName
- StringIOException
SMBException
public final RIDList getGroupsForUser(PolicyHandle usrHandle) throws IOException, SMBException
usrHandle
- PolicyHandleIOException
SMBException
public final RIDList getAliasesForUser(String domain, String userName) throws IOException, SMBException
domain
- StringuserName
- StringIOException
SMBException
public final RIDList getAliasesForUser(PolicyHandle domHandle, SID userSID) throws IOException, SMBException
domHandle
- PolicyHandleuserSID
- SIDIOException
SMBException
public final UserInfo queryUserInformation(PolicyHandle usrHandle, int infoLevel) throws IOException, SMBException
usrHandle
- PolicyHandleinfoLevel
- intIOException
SMBException
public final void closeHandle(PolicyHandle handle) throws IOException, SMBException
handle
- PolicyHandleIOException
SMBException
public void ClosePipe() throws IOException, SMBException
ClosePipe
in class IPCPipeFile
IOException
SMBException
public final void clearCaches() throws IOException, SMBException
IOException
SMBException
Copyright © 2005–2018 Alfresco Software. All rights reserved.