OSAPI  0.29
Open System API

The Security module. More...

Collaboration diagram for SEC:

Functions

t_status sec_module_supported (void)
 Is the Security module supported in the platform return Operation status.
 
t_status sec_group_exists (t_gid gid)
 Checks if the group ID exists in the system. More...
 
t_status sec_group_stringToId (char *string, t_gid *gid)
 Convert a string into a Group ID. More...
 
t_status sec_group_idToString (t_gid gid, t_size size, char *string)
 Convert a Group Id to a C String. More...
 
t_status sec_group_compare (t_gid gid1, t_gid gid2, bool *result)
 Compare two group IDs. More...
 
t_status sec_group_copy (t_gid source, t_gid *target)
 Copy a group ID. More...
 
t_status sec_group_getId (t_gid *gid)
 Get current group ID. More...
 
t_status sec_group_setId (t_gid gid)
 Set current group ID. More...
 
t_status sec_group_getIdFromName (char *groupname, t_gid *gid)
 Obtain the group ID from the group Name. More...
 
t_status sec_group_getNameFromID (t_gid gid, t_size size, char *groupname)
 Obtain the group Name from the group ID. More...
 
t_status sec_group_getMaxSize (t_size *size)
 Get the maximum size in bytes of a group name. More...
 
t_status sec_group_getMaxNumber (t_size *max)
 Get the maximum number of groups that a user can have. More...
 
t_status sec_user_exists (t_uid uid)
 Checks if the user ID exists in the system. More...
 
t_status sec_user_stringToId (char *string, t_uid *uid)
 Convert a string into a user ID. More...
 
t_status sec_user_idToString (t_uid uid, t_size size, char *string)
 Convert a user Id to a C String. More...
 
t_status sec_user_compare (t_uid uid1, t_uid uid2, bool *result)
 Compare two user IDs. More...
 
t_status sec_user_copy (t_uid source, t_uid *target)
 Copy a user ID. More...
 
t_status sec_user_getId (t_uid *uid)
 Get current user ID. More...
 
t_status sec_user_setId (t_uid uid)
 Set current user ID. More...
 
t_status sec_user_getIdFromName (char *username, t_uid *uid)
 Obtain the user ID from the user Name. More...
 
t_status sec_user_getNameFromID (t_uid uid, t_size size, char *username)
 Obtain the user Name from the user ID. More...
 
t_status sec_user_getMaxSize (t_size *size)
 Get the maximum size in bytes of a user name. More...
 
t_status sec_user_getGroups (t_uid uid, size_t groupListMaxSize, size_t *groupListCurSize, t_gid *groupList)
 Get the user groups. More...
 

Detailed Description

The Security module.


Function Documentation

◆ sec_group_compare()

t_status sec_group_compare ( t_gid  gid1,
t_gid  gid2,
bool *  result 
)

Compare two group IDs.

Parameters
[in]gid1- First group ID
[in]gid2- Second group ID
[out]result- True if identical. False otherwise.
Returns
Operation status

◆ sec_group_copy()

t_status sec_group_copy ( t_gid  source,
t_gid *  target 
)

Copy a group ID.

Parameters
[in]source- Group ID
[out]target- Group ID
Returns
Operation status

◆ sec_group_exists()

t_status sec_group_exists ( t_gid  gid)

Checks if the group ID exists in the system.

Parameters
[out]gid- group ID
Returns
Operation status

◆ sec_group_getId()

t_status sec_group_getId ( t_gid *  gid)

Get current group ID.

Parameters
[out]gid- Current group ID
Returns
Operation status

◆ sec_group_getIdFromName()

t_status sec_group_getIdFromName ( char *  groupname,
t_gid *  gid 
)

Obtain the group ID from the group Name.

Parameters
[in]groupname- The group name
[out]gid- The group ID
Returns
Operation status

◆ sec_group_getMaxNumber()

t_status sec_group_getMaxNumber ( t_size max)

Get the maximum number of groups that a user can have.

Parameters
[out]max- Maximum number of user groups
Returns
Operation status

◆ sec_group_getMaxSize()

t_status sec_group_getMaxSize ( t_size size)

Get the maximum size in bytes of a group name.

Parameters
[out]size- Maximum size of group name
Returns
Operation status

◆ sec_group_getNameFromID()

t_status sec_group_getNameFromID ( t_gid  gid,
t_size  size,
char *  groupname 
)

Obtain the group Name from the group ID.

Parameters
[in]gid- The group ID
[in]size- Size of the groupname string
[out]groupname- The group name
Returns
Operation status

◆ sec_group_idToString()

t_status sec_group_idToString ( t_gid  gid,
t_size  size,
char *  string 
)

Convert a Group Id to a C String.

Parameters
[in]gid- Group ID
[in]size- Size of the C string
[out]string- String with group ID
Returns
Operation status

◆ sec_group_setId()

t_status sec_group_setId ( t_gid  gid)

Set current group ID.

Parameters
[in]gid- New group ID
Returns
Operation status

◆ sec_group_stringToId()

t_status sec_group_stringToId ( char *  string,
t_gid *  gid 
)

Convert a string into a Group ID.

Parameters
[in]string- C string
[out]gid- group ID
Returns
Operation status

◆ sec_user_compare()

t_status sec_user_compare ( t_uid  uid1,
t_uid  uid2,
bool *  result 
)

Compare two user IDs.

Parameters
[in]uid1- First user ID
[in]uid2- Second user ID
[out]result- True if identical. False otherwise.
Returns
Operation status

◆ sec_user_copy()

t_status sec_user_copy ( t_uid  source,
t_uid *  target 
)

Copy a user ID.

Parameters
[in]source- User ID
[out]target- User ID
Returns
Operation status

◆ sec_user_exists()

t_status sec_user_exists ( t_uid  uid)

Checks if the user ID exists in the system.

Parameters
[out]uid- User ID
Returns
Operation status

◆ sec_user_getGroups()

t_status sec_user_getGroups ( t_uid  uid,
size_t  groupListMaxSize,
size_t *  groupListCurSize,
t_gid *  groupList 
)

Get the user groups.

Parameters
[in]uid- The target user ID
[in]groupListMaxSize- The maximum number of user groups
[out]groupListCurSize- Number of current user groups
[out]groupList- List of user groups (IDs)
Returns
Operation status

◆ sec_user_getId()

t_status sec_user_getId ( t_uid *  uid)

Get current user ID.

Parameters
[out]uid- Current user ID
Returns
Operation status

◆ sec_user_getIdFromName()

t_status sec_user_getIdFromName ( char *  username,
t_uid *  uid 
)

Obtain the user ID from the user Name.

Parameters
[in]username- The user name
[out]uid- The user ID
Returns
Operation status

◆ sec_user_getMaxSize()

t_status sec_user_getMaxSize ( t_size size)

Get the maximum size in bytes of a user name.

Parameters
[out]size- Maximum size of user name
Returns
Operation status

◆ sec_user_getNameFromID()

t_status sec_user_getNameFromID ( t_uid  uid,
t_size  size,
char *  username 
)

Obtain the user Name from the user ID.

Parameters
[in]uid- The user ID
[in]size- Size of the username string
[out]username- The group name
Returns
Operation status

◆ sec_user_idToString()

t_status sec_user_idToString ( t_uid  uid,
t_size  size,
char *  string 
)

Convert a user Id to a C String.

Parameters
[in]uid- user ID
[in]size- Size of the C string
[out]string- String with user ID
Returns
Operation status

◆ sec_user_setId()

t_status sec_user_setId ( t_uid  uid)

Set current user ID.

Parameters
[in]uid- New user ID
Returns
Operation status

◆ sec_user_stringToId()

t_status sec_user_stringToId ( char *  string,
t_uid *  uid 
)

Convert a string into a user ID.

Parameters
[in]string- C string
[out]uid- user ID
Returns
Operation status