User and Group ID Services
[Apache Portability Runtime library]


Defines

#define apr_uid_compare(left, right)   (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH)
#define apr_gid_compare(left, right)   (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH)

Typedefs

typedef uid_t apr_uid_t
typedef gid_t apr_gid_t

Functions

apr_status_t apr_uid_current (apr_uid_t *userid, apr_gid_t *groupid, apr_pool_t *p)
apr_status_t apr_uid_name_get (char **username, apr_uid_t userid, apr_pool_t *p)
apr_status_t apr_uid_get (apr_uid_t *userid, apr_gid_t *groupid, const char *username, apr_pool_t *p)
apr_status_t apr_uid_homepath_get (char **dirname, const char *username, apr_pool_t *p)
apr_status_t apr_gid_name_get (char **groupname, apr_gid_t groupid, apr_pool_t *p)
apr_status_t apr_gid_get (apr_gid_t *groupid, const char *groupname, apr_pool_t *p)

Define Documentation

#define apr_gid_compare ( left,
right   )     (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH)

Compare two group identifiers for equality.

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.
Remarks:
This function is available only if APR_HAS_USER is defined.

#define apr_uid_compare ( left,
right   )     (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH)

Compare two user identifiers for equality.

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.
Remarks:
This function is available only if APR_HAS_USER is defined.


Typedef Documentation

typedef gid_t apr_gid_t

Structure for determining group ownership.

typedef uid_t apr_uid_t

Structure for determining user ownership.


Function Documentation

apr_status_t apr_gid_get ( apr_gid_t groupid,
const char *  groupname,
apr_pool_t p 
)

Get the groupid for a specified group name

Parameters:
groupid Pointer to the group id (on output)
groupname The group name to look up
p The pool from which to allocate the string
Remarks:
This function is available only if APR_HAS_USER is defined.

apr_status_t apr_gid_name_get ( char **  groupname,
apr_gid_t  groupid,
apr_pool_t p 
)

Get the group name for a specified groupid

Parameters:
groupname Pointer to new string containing group name (on output)
groupid The groupid
p The pool from which to allocate the string
Remarks:
This function is available only if APR_HAS_USER is defined.

apr_status_t apr_uid_current ( apr_uid_t userid,
apr_gid_t groupid,
apr_pool_t p 
)

Get the userid (and groupid) of the calling process

Parameters:
userid Returns the user id
groupid Returns the user's group id
p The pool from which to allocate working space
Remarks:
This function is available only if APR_HAS_USER is defined.

apr_status_t apr_uid_get ( apr_uid_t userid,
apr_gid_t groupid,
const char *  username,
apr_pool_t p 
)

Get the userid (and groupid) for the specified username

Parameters:
userid Returns the user id
groupid Returns the user's group id
username The username to lookup
p The pool from which to allocate working space
Remarks:
This function is available only if APR_HAS_USER is defined.

apr_status_t apr_uid_homepath_get ( char **  dirname,
const char *  username,
apr_pool_t p 
)

Get the home directory for the named user

Parameters:
dirname Pointer to new string containing directory name (on output)
username The named user
p The pool from which to allocate the string
Remarks:
This function is available only if APR_HAS_USER is defined.

apr_status_t apr_uid_name_get ( char **  username,
apr_uid_t  userid,
apr_pool_t p 
)

Get the user name for a specified userid

Parameters:
username Pointer to new string containing user name (on output)
userid The userid
p The pool from which to allocate the string
Remarks:
This function is available only if APR_HAS_USER is defined.


Generated on Mon Nov 26 11:23:53 2007 for Apache Portable Runtime by  doxygen 1.5.2