public class OncRpcClientAuthUnix extends OncRpcClientAuth
OncRpcClientAuthUnix
class handles protocol issues of
ONC/RPC AUTH_UNIX
(and thus AUTH_SHORT
)
authentication.Modifier and Type | Field and Description |
---|---|
static int[] |
NO_GIDS
Contains an empty array of group IDs.
|
Constructor and Description |
---|
OncRpcClientAuthUnix(String machinename,
int uid,
int gid)
Constructs a new
OncRpcClientAuthUnix authentication
protocol handling object capable of handling AUTH_UNIX
and AUTH_SHORT . |
OncRpcClientAuthUnix(String machinename,
int uid,
int gid,
int[] gids)
Constructs a new
OncRpcClientAuthUnix authentication
protocol handling object capable of handling AUTH_UNIX
and AUTH_SHORT . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canRefreshCred()
Indicates whether the ONC/RPC authentication credential can be
refreshed.
|
int |
getGid()
Returns the group ID from the credential.
|
int[] |
getGids()
Returns the group IDs from the credential.
|
String |
getMachinename()
Returns the machine name information from the credential.
|
int |
getStamp()
Returns the timestamp information from the credential.
|
int |
getUid()
Returns the user ID from the credential.
|
void |
setGid(int gid)
Sets the group ID in the credential.
|
void |
setGids(int[] gids)
Sets the group IDs in the credential.
|
void |
setMachinename(String machinename)
Sets the machine name information in the credential.
|
void |
setStamp(int stamp)
Sets the timestamp information in the credential.
|
void |
setUid(int uid)
Sets the user ID in the credential.
|
protected void |
xdrDecodeVerf(XdrDecodingStream xdr)
Decodes ONC/RPC authentication information in form of a verifier
when receiving an ONC/RPC reply message.
|
protected void |
xdrEncodeCredVerf(XdrEncodingStream xdr)
Encodes ONC/RPC authentication information in form of a credential
and a verifier when sending an ONC/RPC call message.
|
public OncRpcClientAuthUnix(String machinename, int uid, int gid, int[] gids)
OncRpcClientAuthUnix
authentication
protocol handling object capable of handling AUTH_UNIX
and AUTH_SHORT
.
Please note that the credential information is typically only unique within a particular domain of machines, user IDs and group IDs.
machinename
- Name of the caller's machine (like
"ebankruptcy-dot-com", just for instance...).uid
- Caller's effective user ID.gid
- Caller's effective group ID.gids
- Array of group IDs the caller is a member of.public OncRpcClientAuthUnix(String machinename, int uid, int gid)
OncRpcClientAuthUnix
authentication
protocol handling object capable of handling AUTH_UNIX
and AUTH_SHORT
.
Please note that the credential information is typically only unique within a particular domain of machines, user IDs and group IDs.
machinename
- Name of the caller's machine (like
"ebankruptcy-dot-com", just for instance...).uid
- Caller's effective user ID.gid
- Caller's effective group ID.protected void xdrEncodeCredVerf(XdrEncodingStream xdr) throws OncRpcException, IOException
AUTH_UNIX
authentication method only uses the credential
but no verifier. If the ONC/RPC server sent a AUTH_SHORT
"shorthand" credential together with the previous reply message, it
is used instead of the original credential.xdrEncodeCredVerf
in class OncRpcClientAuth
xdr
- XDR stream where to encode the credential and the verifier
to.OncRpcException
- if an ONC/RPC error occurs.IOException
- if an I/O error occurs.protected void xdrDecodeVerf(XdrDecodingStream xdr) throws OncRpcException, IOException
xdrDecodeVerf
in class OncRpcClientAuth
xdr
- XDR stream from which to receive the verifier sent together
with an ONC/RPC reply message.OncRpcAuthenticationException
- if the received verifier is
not kosher.OncRpcException
- if an ONC/RPC error occurs.IOException
- if an I/O error occurs.protected boolean canRefreshCred()
canRefreshCred
in class OncRpcClientAuth
public void setStamp(int stamp)
stamp
- New timestamppublic int getStamp()
public void setMachinename(String machinename)
machinename
- Machine name.public String getMachinename()
public void setUid(int uid)
uid
- User ID.public int getUid()
public void setGid(int gid)
gid
- Group ID.public int getGid()
public void setGids(int[] gids)
gids
- Array of group IDs.public int[] getGids()
Copyright © 2015. All rights reserved.