org.apache.tomcat.jni

Class User

public class User extends Object

User

Version: $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $

Author: Mladen Turk

Method Summary
static longgid(String groupname, long p)
Get the groupid for a specified group name This function is available only if APR_HAS_USER is defined.
static intgidcompare(long left, long right)
Compare two group identifiers for equality.
static longgidCurrent(long p)
Get the groupid of the calling process This function is available only if APR_HAS_USER is defined.
static Stringgroupname(long groupid, long p)
Get the group name for a specified groupid This function is available only if APR_HAS_USER is defined.
static Stringhomepath(String username, long p)
Get the home directory for the named user This function is available only if APR_HAS_USER is defined.
static longuid(String username, long p)
Get the userid for the specified username This function is available only if APR_HAS_USER is defined.
static intuidcompare(long left, long right)
Compare two user identifiers for equality.
static longuidCurrent(long p)
Get the userid (and groupid) of the calling process This function is available only if APR_HAS_USER is defined.
static longusergid(String username, long p)
Get the groupid for the specified username This function is available only if APR_HAS_USER is defined.
static Stringusername(long userid, long p)
Get the user name for a specified userid This function is available only if APR_HAS_USER is defined.

Method Detail

gid

public static long gid(String groupname, long p)
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

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.

gidCurrent

public static long gidCurrent(long p)
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

groupname

public static 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.

Parameters: groupid The groupid p The pool from which to allocate the string

Returns: New string containing group name

homepath

public static String homepath(String username, long p)
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

uid

public static long uid(String username, long p)
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

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.

uidCurrent

public 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.

Parameters: p The pool from which to allocate working space

Returns: Returns the user id

usergid

public static long usergid(String username, long p)
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

username

public static 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.

Parameters: userid The userid p The pool from which to allocate the string

Returns: New string containing user name

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