FileDocCategorySizeDatePackage
User.javaAPI DocApache Tomcat 6.0.144772Fri Jul 20 04:20:36 BST 2007org.apache.tomcat.jni

User

public class User extends Object
User
author
Mladen Turk
version
$Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $

Fields Summary
Constructors Summary
Methods Summary
public static native longgid(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.

param
groupname The group name to look up
param
p The pool from which to allocate working space
return
Returns the user's group id

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

param
p The pool from which to allocate working space
return
Returns the group id

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

param
left One gid to test
param
right Another gid to test
return
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.

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

param
groupid The groupid
param
p The pool from which to allocate the string
return
New string containing group name

public static native java.lang.Stringhomepath(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.

param
username The named user
param
p The pool from which to allocate the string
return
New string containing directory name

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

param
username The username to lookup
param
p The pool from which to allocate working space
return
Returns the user id

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

param
p The pool from which to allocate working space
return
Returns the user id

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

param
left One uid to test
param
right Another uid to test
return
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.

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

param
username The username to lookup
param
p The pool from which to allocate working space
return
Returns the user's group id

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

param
userid The userid
param
p The pool from which to allocate the string
return
New string containing user name