![]() |
Open Lighting Architecture 0.10.9
|
User & Group Information.
Files | |
| file | Credentials.cpp |
| file | Credentials.h |
| User & Group Information. | |
Classes | |
| struct | ola::PasswdEntry |
| Contains information about a user. More... | |
| struct | ola::GroupEntry |
| Contains information about a group. More... | |
Get / Set User ID | |
| bool | ola::SupportsUIDs () |
| Check whether the current platform supports User and Group IDs. | |
| bool | ola::GetUID (uid_t *uid) |
| Get the real UID of the process. | |
| bool | ola::GetEUID (uid_t *euid) |
| Get the effective UID of the process. | |
| bool | ola::SetUID (uid_t new_uid) |
| Set the effective UID of the process. | |
Get / Set Group ID | |
| bool | ola::GetGID (gid_t *gid) |
| Get the real Group ID. | |
| bool | ola::GetEGID (gid_t *egid) |
| Get the effective group ID. | |
| bool | ola::SetGID (gid_t new_gid) |
| Set the effective Group ID of the process. | |
Get / Set supplementary group IDs | |
| int | ola::GetGroups (int size, gid_t list[]) |
| Get the supplementary group ID's of the process. | |
| bool | ola::SetGroups (size_t size, const gid_t *list) |
| Set the supplementary group ID's of the process. | |
Lookup User Information | |
| bool | ola::GetPasswdName (const std::string &name, PasswdEntry *passwd) |
| Lookup a user account by username. | |
| bool | ola::GetPasswdUID (uid_t uid, PasswdEntry *passwd) |
| Lookup a user account by UID. | |
Lookup Group Information. | |
| bool | ola::GetGroupName (const std::string &name, GroupEntry *passwd) |
| Lookup a group account by name. | |
| bool | ola::GetGroupGID (gid_t gid, GroupEntry *passwd) |
| Lookup a group account by GID. | |
| bool ola::GetEGID | ( | gid_t * | egid | ) |
Get the effective group ID.
| [out] | egid | is the variable to receive the effective Group ID |
| bool ola::GetEUID | ( | uid_t * | euid | ) |
| bool ola::GetGID | ( | gid_t * | gid | ) |
Get the real Group ID.
| [out] | gid | is the variable to receive the real Group ID |
| bool ola::GetGroupGID | ( | gid_t | gid, |
| GroupEntry * | passwd ) |
Lookup a group account by GID.
| [in] | gid | is the Group ID to match against |
| [out] | passwd | is a GroupEntry to be populated upon success |
| bool ola::GetGroupName | ( | const std::string & | name, |
| GroupEntry * | passwd ) |
Lookup a group account by name.
| [in] | name | the name of the group to match |
| [out] | passwd | is a GroupEntry to be populated upon success |
| int ola::GetGroups | ( | int | size, |
| gid_t | list[] ) |
Get the supplementary group ID's of the process.
| size | the size of the list to place group ID's in | |
| [out] | list | the list to place group ID's |
| bool ola::GetPasswdName | ( | const std::string & | name, |
| PasswdEntry * | passwd ) |
Lookup a user account by username.
| [in] | name | username to search for. |
| [out] | passwd | struct to hold information for username name |
| bool ola::GetPasswdUID | ( | uid_t | uid, |
| PasswdEntry * | passwd ) |
Lookup a user account by UID.
| [in] | uid | is the User ID to match against |
| [out] | passwd | struct to hold information for uid |
| bool ola::GetUID | ( | uid_t * | uid | ) |
| bool ola::SetGID | ( | gid_t | new_gid | ) |
Set the effective Group ID of the process.
| new_gid | new Group ID to set process group to |
| bool ola::SetGroups | ( | size_t | size, |
| const gid_t * | list ) |
Set the supplementary group ID's of the process.
| size | the size of the list of ID's |
| list | pointer to the list of ID's |
| bool ola::SetUID | ( | uid_t | new_uid | ) |
Set the effective UID of the process.
| new_uid | is the user id to set the processes to |
| bool ola::SupportsUIDs | ( | ) |
Check whether the current platform supports User and Group IDs.