Checks whether a security mechanism is installed.
Network Services Library (libnsl.a)
You can use the subroutine to determine whether the specified security mechanism is installed.
Item | Description |
---|---|
mechanism | Specifies a security mechanism (for example, kerberosv5). |
Item | Description |
---|---|
TRUE | successful |
FALSE | unsuccessful |
#include <stdlib.h>
#include <rpc/rpc.h>
#include <rpc/rpcsec_gss.h>
int main()
{
char *mechanism;
mechanism = "kerberosv5";
/* Check if mechanism is installed */
if(rpc_gss_is_installed(mechanism) == FALSE)
{
fprintf(stderr,"\n%s Mechanism not installed!\n", mechanism);
exit(1);
}
return 0;
}