Package com.sun.rpc
Class CredUnix
java.lang.Object
com.sun.rpc.Cred
com.sun.rpc.CredUnix
The Unix credential. Contains information specific
to Unix users and NFS: uid/gid/grplist
-
Field Summary
FieldsFields inherited from class com.sun.rpc.Cred
SVC_INTEGRITY, SVC_NONE, SVC_PRIVACY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
Given a username and passwd, obtain Unix creds from the named server.int
getGid()
Get the Unix group id for the userint[]
getGids()
Get the Unix group list for the usergetHome()
Get the user's home directory pathint
getUid()
Get the Unix user id for the userint
getUmask()
Get the user's home Unix umaskvoid
init
(Connection conn, int prog, int vers) boolean
refresh
(Connection conn, int prog, int vers) void
setCred()
Set the cred back to the default: nobody/nobodyvoid
setCred
(int uid, int gid, int[] gids) Set the uid, gidtoString()
int
void
validate
(byte[] verifier, int verifiee) void
-
Field Details
-
status
public int status
-
-
Constructor Details
-
CredUnix
public CredUnix(int uid, int gid) Constructor creates an instance of Unix credential with given uid/gid -
CredUnix
public CredUnix()Constructor creates an instance of Unix credential and sets default uid/gid to "nobody".
-
-
Method Details
-
fetchCred
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.- Parameters:
server
- Name of the pcnfsd server that will return the creds.username
- the login name of the user.passwd
- of the user.
-
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 -
getUid
public int getUid()Get the Unix user id for the user- Returns:
- uid
-
getGid
public int getGid()Get the Unix group id for the user- Returns:
- gid
-
getGids
public int[] getGids()Get the Unix group list for the user- Returns:
- gids
-
getHome
Get the user's home directory path- Returns:
- pathname of home directory.
-
getUmask
public int getUmask()Get the user's home Unix umask- Returns:
- umask
-
toString
-
init
-
refresh
-
wrap
-
unwrap
-
validate
public void validate(byte[] verifier, int verifiee) -
destroy
-