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,
java.lang.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(java.lang.String domain)
Enumerate the aliases/local groups in a domain
|
StringList |
enumerateDomains()
Enumerate the domains in the server
|
StringList |
enumerateGroups(java.lang.String domain)
Enumerate the groups in a domain
|
StringList |
enumerateUsers(java.lang.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(java.lang.String domain,
java.lang.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(java.lang.String domain,
java.lang.String userName)
Return the list of groups that the user has membership of
|
SID |
lookupDomain(java.lang.String domain)
Find a domain and return the SID
|
java.lang.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,
java.lang.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(java.lang.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(java.lang.String domain,
java.lang.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, java.lang.String name, int maxTx, int maxRx) throws java.io.IOException, SMBException, DCEException
sess
- SMBIPCSessionpkt
- DCEPackethandle
- intname
- StringmaxTx
- intmaxRx
- intjava.io.IOException
SMBException
DCEException
protected final SamrPolicyHandle openService() throws java.io.IOException, SMBException
java.io.IOException
SMBException
public final StringList enumerateDomains() throws java.io.IOException, SMBException
java.io.IOException
SMBException
public final StringList enumerateGroups(java.lang.String domain) throws java.io.IOException, SMBException
java.io.IOException
SMBException
public final StringList enumerateUsers(java.lang.String domain) throws java.io.IOException, SMBException
java.io.IOException
SMBException
public final StringList enumerateAliases(java.lang.String domain) throws java.io.IOException, SMBException
java.io.IOException
SMBException
public final SID lookupDomain(java.lang.String domain) throws java.io.IOException, SMBException
domain
- Stringjava.io.IOException
SMBException
public final PolicyHandle openDomain(java.lang.String domain) throws java.io.IOException, SMBException
domain
- Stringjava.io.IOException
SMBException
public final PolicyHandle openBuiltinDomain() throws java.io.IOException, SMBException
java.io.IOException
SMBException
public final PolicyHandle openDomain(SID domainSID) throws java.io.IOException, SMBException
domainSID
- SIDjava.io.IOException
SMBException
public final RIDList lookupName(PolicyHandle domHandle, java.lang.String name) throws java.io.IOException, SMBException
domHandle
- PolicyHandlename
- Stringjava.io.IOException
SMBException
public final RIDList lookupName(SID sid) throws java.io.IOException, SMBException
sid
- SIDjava.io.IOException
SMBException
public final java.lang.String lookupDomainName(SID sid) throws java.io.IOException, SMBException
sid
- SIDjava.io.IOException
SMBException
public final RIDList lookupIds(PolicyHandle domHandle, RIDList rids) throws java.io.IOException, SMBException
domHandle
- PolicyHandlerids
- RIDListjava.io.IOException
SMBException
public final RIDList lookupIds(PolicyHandle domHandle, int[] ids) throws java.io.IOException, SMBException
domHandle
- PolicyHandleids
- int[]java.io.IOException
SMBException
public final RIDList lookupIds(PolicyHandle domHandle, int[] ids, int count) throws java.io.IOException, SMBException
domHandle
- PolicyHandleids
- int[]count
- intjava.io.IOException
SMBException
public final PolicyHandle openUser(PolicyHandle domHandle, RID rid) throws java.io.IOException, SMBException
handle
- domHandle PolicyHandlerid
- RIDjava.io.IOException
SMBException
public final PolicyHandle openUser(java.lang.String domain, java.lang.String userName) throws java.io.IOException, SMBException
domHandle
- PolicyHandlerid
- intjava.io.IOException
SMBException
public final PolicyHandle openUser(PolicyHandle domHandle, int rid) throws java.io.IOException, SMBException
handle
- domHandle PolicyHandlerid
- intjava.io.IOException
SMBException
public final RIDList getGroupsForUser(java.lang.String domain, java.lang.String userName) throws java.io.IOException, SMBException
domain
- StringuserName
- Stringjava.io.IOException
SMBException
public final RIDList getGroupsForUser(PolicyHandle usrHandle) throws java.io.IOException, SMBException
usrHandle
- PolicyHandlejava.io.IOException
SMBException
public final RIDList getAliasesForUser(java.lang.String domain, java.lang.String userName) throws java.io.IOException, SMBException
domain
- StringuserName
- Stringjava.io.IOException
SMBException
SaveException
public final RIDList getAliasesForUser(PolicyHandle domHandle, SID userSID) throws java.io.IOException, SMBException
domHandle
- PolicyHandleuserSID
- SIDjava.io.IOException
SMBException
public final UserInfo queryUserInformation(PolicyHandle usrHandle, int infoLevel) throws java.io.IOException, SMBException
usrHandle
- PolicyHandleinfoLevel
- intjava.io.IOException
SMBException
public final void closeHandle(PolicyHandle handle) throws java.io.IOException, SMBException
handle
- PolicyHandlejava.io.IOException
SMBException
public void ClosePipe() throws java.io.IOException, SMBException
ClosePipe
in class IPCPipeFile
java.io.IOException
SMBException
public final void clearCaches() throws java.io.IOException, SMBException
java.io.IOException
SMBException
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.