lrt_tpchkauth
Checks if the application configuration requires authentication.
int lrt_tpchkauth( );
The lrt_tpchkauth function checks if the application configuration requires authentication. This is typically used by application clients prior to calling lrt_tpinitialize, to determine if a password is required.
Return Values
If the function succeeds, it returns one of the following non-negative values:
- TPNOAUTH - no authentication required
- TPSYSAUTH - requires system authentication only
- TPAPPAUTH - both system and application-specific authentication are required
If the function ends with an error, it returns -1 and sets the error code in tperrno return values.
Parameterization
Parameterization is not applicable to this function.
Example
In the following example, lrt_tpchkauth checks whether the authentication is required.
if (lrt_tpchkauth() == TPNOAUTH)
lrt_output_message("No authentication required.");

