com.sun.rpc
Class CredUnix
The Unix credential. Contains information specific
to Unix users and NFS: uid/gid/grplist
CredUnix() - Constructor creates an instance of
Unix credential and sets default uid/gid
to "nobody".
|
CredUnix(int uid, int gid) - Constructor creates an instance of
Unix credential with given uid/gid
|
void | destroy(Rpc rpc) - Destroy the cred data and its security context with the server
|
boolean | fetchCred(String server, String username, String passwd) - Given a username and passwd, obtain Unix creds
from the named server.
|
int | getGid() - Get the Unix group id for the user
|
int[] | getGids() - Get the Unix group list for the user
|
String | getHome() - Get the user's home directory path
|
int | getUid() - Get the Unix user id for the user
|
int | getUmask() - Get the user's home Unix umask
|
void | init(Connection conn, int prog, int vers) - Initiate a security context with peers
|
boolean | refresh(Connection conn, int prog, int vers) - Refresh the cred
|
void | setCred() - Set the cred back to the default: nobody/nobody
|
void | setCred(int uid, int gid, int[] gids) - Set the uid, gid
|
String | toString()
|
int | unwrap(Xdr x) - Descrypt an XDR buffer
|
void | validate(byte[] verifier, int verifiee) - Validate the response verifier from server
|
void | wrap(Xdr x, byte[] arg) - Encrypt an XDR buffer
|
CredUnix
public CredUnix()
Constructor creates an instance of
Unix credential and sets default uid/gid
to "nobody".
CredUnix
public CredUnix(int uid,
int gid)
Constructor creates an instance of
Unix credential with given uid/gid
destroy
public void destroy(Rpc rpc)
Destroy the cred data and its security context with the server
fetchCred
public boolean fetchCred(String server,
String username,
String passwd)
Given a username and passwd, obtain Unix creds
from the named server. This is not necessarily
an NFS server.
If we fail then the creds are unaffected.
server
- Name of the pcnfsd server that will return the creds.username
- the login name of the user.passwd
- of the user.
getGid
public int getGid()
Get the Unix group id for the user
getGids
public int[] getGids()
Get the Unix group list for the user
getHome
public String getHome()
Get the user's home directory path
- pathname of home directory.
getUid
public int getUid()
Get the Unix user id for the user
getUmask
public int getUmask()
Get the user's home Unix umask
init
public void init(Connection conn,
int prog,
int vers)
Initiate a security context with peers
refresh
public boolean refresh(Connection conn,
int prog,
int vers)
Refresh the cred
setCred
public void setCred()
Set the cred back to the default: nobody/nobody
setCred
public void setCred(int uid,
int gid,
int[] gids)
Set the uid, gid
toString
public String toString()
unwrap
public int unwrap(Xdr x)
Descrypt an XDR buffer
validate
public void validate(byte[] verifier,
int verifiee)
Validate the response verifier from server
wrap
public void wrap(Xdr x,
byte[] arg)
Encrypt an XDR buffer