int myqttd_get_system_id ( MyQttdCtx ctx,
const char *  value,
axl_bool  get_user 
)

Allows to get system user id or system group id from the provided string.

If the string already contains the user id or group id, the function returns its corresponding integet value. The function also checks if the value (that should represent a user or group in some way) is present on the current system. get_user parameter controls if the operation should perform a user lookup or a group lookup.

Parameters
ctxThe myqttd context.
valueThe user or group to get system id.
get_useraxl_true to signal the value to lookup user, otherwise axl_false to lookup for groups.
Returns
The function returns the user or group id or -1 if it fails.

References msg.

Referenced by myqttd_change_fd_owner().