Apache Tomcat 6.0.39

org.apache.tomcat.jni
Class User

java.lang.Object
  extended by org.apache.tomcat.jni.User

public class User
extends java.lang.Object

User

Version:
$Id: User.java 939351 2010-04-29 15:41:54Z kkolinko $
Author:
Mladen Turk

Constructor Summary
User()
           
 
Method Summary
static long gid(java.lang.String groupname, long p)
          Get the groupid for a specified group name This function is available only if APR_HAS_USER is defined.
static int gidcompare(long left, long right)
          Compare two group identifiers for equality.
static long gidCurrent(long p)
          Get the groupid of the calling process This function is available only if APR_HAS_USER is defined.
static java.lang.String groupname(long groupid, long p)
          Get the group name for a specified groupid This function is available only if APR_HAS_USER is defined.
static java.lang.String homepath(java.lang.String username, long p)
          Get the home directory for the named user This function is available only if APR_HAS_USER is defined.
static long uid(java.lang.String username, long p)
          Get the userid for the specified username This function is available only if APR_HAS_USER is defined.
static int uidcompare(long left, long right)
          Compare two user identifiers for equality.
static long uidCurrent(long p)
          Get the userid (and groupid) of the calling process This function is available only if APR_HAS_USER is defined.
static long usergid(java.lang.String username, long p)
          Get the groupid for the specified username This function is available only if APR_HAS_USER is defined.
static java.lang.String username(long userid, long p)
          Get the user name for a specified userid This function is available only if APR_HAS_USER is defined.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

User

public User()
Method Detail

uidCurrent

public static long uidCurrent(long p)
                       throws Error
Get the userid (and groupid) of the calling process This function is available only if APR_HAS_USER is defined.

Parameters:
p - The pool from which to allocate working space
Returns:
Returns the user id
Throws:
Error

gidCurrent

public static long gidCurrent(long p)
                       throws Error
Get the groupid of the calling process This function is available only if APR_HAS_USER is defined.

Parameters:
p - The pool from which to allocate working space
Returns:
Returns the group id
Throws:
Error

uid

public static long uid(java.lang.String username,
                       long p)
                throws Error
Get the userid for the specified username This function is available only if APR_HAS_USER is defined.

Parameters:
username - The username to lookup
p - The pool from which to allocate working space
Returns:
Returns the user id
Throws:
Error

usergid

public static long usergid(java.lang.String username,
                           long p)
                    throws Error
Get the groupid for the specified username This function is available only if APR_HAS_USER is defined.

Parameters:
username - The username to lookup
p - The pool from which to allocate working space
Returns:
Returns the user's group id
Throws:
Error

gid

public static long gid(java.lang.String groupname,
                       long p)
                throws Error
Get the groupid for a specified group name This function is available only if APR_HAS_USER is defined.

Parameters:
groupname - The group name to look up
p - The pool from which to allocate working space
Returns:
Returns the user's group id
Throws:
Error

username

public static java.lang.String username(long userid,
                                        long p)
                                 throws Error
Get the user name for a specified userid This function is available only if APR_HAS_USER is defined.

Parameters:
userid - The userid
p - The pool from which to allocate the string
Returns:
New string containing user name
Throws:
Error

groupname

public static java.lang.String groupname(long groupid,
                                         long p)
                                  throws Error
Get the group name for a specified groupid This function is available only if APR_HAS_USER is defined.

Parameters:
groupid - The groupid
p - The pool from which to allocate the string
Returns:
New string containing group name
Throws:
Error

uidcompare

public static int uidcompare(long left,
                             long right)
Compare two user identifiers for equality. This function is available only if APR_HAS_USER is defined.

Parameters:
left - One uid to test
right - Another uid to test
Returns:
APR_SUCCESS if the apr_uid_t strutures identify the same user, APR_EMISMATCH if not, APR_BADARG if an apr_uid_t is invalid.

gidcompare

public static int gidcompare(long left,
                             long right)
Compare two group identifiers for equality. This function is available only if APR_HAS_USER is defined.

Parameters:
left - One gid to test
right - Another gid to test
Returns:
APR_SUCCESS if the apr_gid_t strutures identify the same group, APR_EMISMATCH if not, APR_BADARG if an apr_gid_t is invalid.

homepath

public static java.lang.String homepath(java.lang.String username,
                                        long p)
                                 throws Error
Get the home directory for the named user This function is available only if APR_HAS_USER is defined.

Parameters:
username - The named user
p - The pool from which to allocate the string
Returns:
New string containing directory name
Throws:
Error

Apache Tomcat 6.0.39

Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.