org.mortbay.setuid
Class SetUID
java.lang.Object
org.mortbay.setuid.SetUID
public class SetUID
- extends 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(String name)
throws SecurityException
- Throws:
SecurityException
getpwuid
public static Passwd getpwuid(int uid)
throws SecurityException
- Throws:
SecurityException
getgrnam
public static Group getgrnam(String name)
throws SecurityException
- Throws:
SecurityException
getgrgid
public static Group getgrgid(int gid)
throws SecurityException
- Throws:
SecurityException
getrlimitnofiles
public static RLimit getrlimitnofiles()
setrlimitnofiles
public static int setrlimitnofiles(RLimit rlimit)
Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.