Package com.sun.rpc
Class CredUnix
- java.lang.Object
-
- com.sun.rpc.Cred
-
- com.sun.rpc.CredUnix
-
public class CredUnix extends Cred
The Unix credential. Contains information specific to Unix users and NFS: uid/gid/grplist
-
-
Field Summary
Fields Modifier and Type Field Description intstatus-
Fields inherited from class com.sun.rpc.Cred
SVC_INTEGRITY, SVC_NONE, SVC_PRIVACY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy(Rpc rpc)booleanfetchCred(java.lang.String server, java.lang.String username, java.lang.String passwd)Given a username and passwd, obtain Unix creds from the named server.intgetGid()Get the Unix group id for the userint[]getGids()Get the Unix group list for the userjava.lang.StringgetHome()Get the user's home directory pathintgetUid()Get the Unix user id for the userintgetUmask()Get the user's home Unix umaskvoidinit(Connection conn, int prog, int vers)booleanrefresh(Connection conn, int prog, int vers)voidsetCred()Set the cred back to the default: nobody/nobodyvoidsetCred(int uid, int gid, int[] gids)Set the uid, gidjava.lang.StringtoString()intunwrap(Xdr x)voidvalidate(byte[] verifier, int verifiee)voidwrap(Xdr x, byte[] arg)
-
-
-
Method Detail
-
fetchCred
public boolean fetchCred(java.lang.String server, java.lang.String username, java.lang.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.- 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
public java.lang.String 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
init
public void init(Connection conn, int prog, int vers)
-
refresh
public boolean refresh(Connection conn, int prog, int vers)
-
wrap
public void wrap(Xdr x, byte[] arg)
-
unwrap
public int unwrap(Xdr x)
-
validate
public void validate(byte[] verifier, int verifiee)
-
destroy
public void destroy(Rpc rpc)
-
-