cctools
|
Obtain information about the current user. More...
Go to the source code of this file.
Macros | |
#define | USERNAME_MAX 256 |
The maximum size of a user name. More... | |
Functions | |
int | username_is_super () |
Determine if the current user is the super user. More... | |
int | username_get (char *name) |
Get the name of the current user. More... | |
int | username_set (const char *name) |
Switch to the named user. More... | |
int | username_home (char *dir) |
Get the current user's home directory. More... | |
Obtain information about the current user.
#define USERNAME_MAX 256 |
The maximum size of a user name.
int username_is_super | ( | ) |
Determine if the current user is the super user.
int username_get | ( | char * | name | ) |
Get the name of the current user.
name | A string of USERNAME_MAX bytes to hold the username. |
int username_set | ( | const char * | name | ) |
Switch to the named user.
name | The name of the user to change privilege to. |
int username_home | ( | char * | dir | ) |
Get the current user's home directory.
dir | A string to hold the home directory. |