org.mortbay.setuid
Class SetUID
java.lang.Object
org.mortbay.setuid.SetUID
public class SetUID
- extends java.lang.Object
Class is for changing user and groupId, it can also be use to retrieve user information by using getpwuid(uid) or getpwnam(username) of both linux and unix systems
- Author:
- Greg Wilkins, Leopoldo Lee Agdeppa III
Field Summary |
static int |
ERROR
|
static int |
OK
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OK
public static final int OK
- See Also:
- Constant Field Values
ERROR
public static final int ERROR
- See Also:
- Constant Field Values
SetUID
public SetUID()
setumask
public static int setumask(int mask)
setuid
public static int setuid(int uid)
setgid
public static int setgid(int gid)
getpwnam
public static Passwd getpwnam(java.lang.String name)
throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
getpwuid
public static Passwd getpwuid(int uid)
throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
getgrnam
public static Group getgrnam(java.lang.String name)
throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
getgrgid
public static Group getgrgid(int gid)
throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
getrlimitnofiles
public static RLimit getrlimitnofiles()
setrlimitnofiles
public static int setrlimitnofiles(RLimit rlimit)
Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.